Commit 28759c4b authored by Yossi Gottlieb's avatar Yossi Gottlieb
Browse files

Fix MSVC build.

parent 2020f6f3
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#include "fmacros.h" #include "fmacros.h"
#include <string.h> #include <string.h>
#include <strings.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef _MSC_VER #ifndef _MSC_VER
#include <unistd.h> #include <unistd.h>
#include <strings.h>
#endif #endif
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "read.h" #include "read.h"
#include "sds.h" #include "sds.h"
#include "win32.h"
static void __redisReaderSetError(redisReader *r, int type, const char *str) { static void __redisReaderSetError(redisReader *r, int type, const char *str) {
size_t len; size_t len;
...@@ -294,9 +295,9 @@ static int processLineItem(redisReader *r) { ...@@ -294,9 +295,9 @@ static int processLineItem(redisReader *r) {
buf[len] = '\0'; buf[len] = '\0';
if (strcasecmp(buf,",inf") == 0) { if (strcasecmp(buf,",inf") == 0) {
d = 1.0/0.0; /* Positive infinite. */ d = INFINITY; /* Positive infinite. */
} else if (strcasecmp(buf,",-inf") == 0) { } else if (strcasecmp(buf,",-inf") == 0) {
d = -1.0/0.0; /* Nevative infinite. */ d = -INFINITY; /* Nevative infinite. */
} else { } else {
d = strtod((char*)buf,&eptr); d = strtod((char*)buf,&eptr);
if (buf[0] == '\0' || eptr[0] != '\0' || isnan(d)) { if (buf[0] == '\0' || eptr[0] != '\0' || isnan(d)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment