From 3e0e51dd9fcfa9c361d716ba2fc935a40fadace3 Mon Sep 17 00:00:00 2001 From: Matt Stancliff Date: Mon, 12 May 2014 10:56:43 -0400 Subject: [PATCH 1/2] Fix lack of SA_ONSTACK under Cygwin Fixes #232 --- src/debug.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/debug.c b/src/debug.c index 3fb491cb..4eb45010 100644 --- a/src/debug.c +++ b/src/debug.c @@ -41,6 +41,12 @@ #include "bio.h" #endif /* HAVE_BACKTRACE */ +#ifdef __CYGWIN__ +#ifndef SA_ONSTACK +#define SA_ONSTACK 0x08000000 +#endif +#endif + /* ================================= Debugging ============================== */ /* Compute the sha1 of string at 's' with 'len' bytes long. From 7c4decb10183224ad9b33505bd6d5cbdb5d8d98b Mon Sep 17 00:00:00 2001 From: Matt Stancliff Date: Mon, 12 May 2014 11:09:07 -0400 Subject: [PATCH 2/2] 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. --- src/object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/object.c b/src/object.c index 46f1f3f8..501dcc32 100644 --- a/src/object.c +++ b/src/object.c @@ -32,6 +32,10 @@ #include #include +#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;