summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/math.c b/math.c
index 8d7bd8c53f..5268598750 100644
--- a/math.c
+++ b/math.c
@@ -193,8 +193,12 @@ math_exp(obj, x)
}
#if defined __CYGWIN__
-#define log(x) ((x) < 0.0 ? nan() : log(x))
-#define log10(x) ((x) < 0.0 ? nan() : log10(x))
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_MAJOR < 1005
+# define nan(x) nan()
+# endif
+# define log(x) ((x) < 0.0 ? nan("") : log(x))
+# define log10(x) ((x) < 0.0 ? nan("") : log10(x))
#endif
static VALUE