summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2014-05-12 11:09:07 -0400
committerantirez <antirez@gmail.com>2014-06-09 11:43:19 +0200
commit8f774ee7ca1b6214391d7106112d63656236b200 (patch)
treee32afa521e019bef1b1091940e296cc8871b87f8
parent2af2414344d2b3269f905be89b3788b2f3215676 (diff)
downloadredis-8f774ee7ca1b6214391d7106112d63656236b200.tar.gz
Fix lack of strtold under Cygwin
Renaming strtold to strtod then casting the result is the standard way of dealing with no strtold in Cygwin.
-rw-r--r--src/object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c
index 2c6b02af4..bec5ec475 100644
--- a/src/object.c
+++ b/src/object.c
@@ -32,6 +32,10 @@
#include <math.h>
#include <ctype.h>
+#ifdef __CYGWIN__
+#define strtold(a,b) ((long double)strtod((a),(b)))
+#endif
+
robj *createObject(int type, void *ptr) {
robj *o = zmalloc(sizeof(*o));
o->type = type;