summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-10 05:48:43 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-10 05:48:43 +0000
commit7fc0ffc7ac65d7c49db15dca0d420abb8c59cb27 (patch)
tree512044c52381b6ba16f4e725e7d2d5c9a421e2f2
parent8a0671421abd81839e5a659118c11daa11197318 (diff)
downloadruby-7fc0ffc7ac65d7c49db15dca0d420abb8c59cb27.tar.gz
ruby-7fc0ffc7ac65d7c49db15dca0d420abb8c59cb27.tar.xz
ruby-7fc0ffc7ac65d7c49db15dca0d420abb8c59cb27.zip
* math.c (math_log): nan takes a dummy argument on Cygwin 1.5.0.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--math.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f00f4d796..87774c7b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jul 10 14:42:02 2003 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * math.c (math_log): nan takes a dummy argument on Cygwin 1.5.0.
+
Wed Jul 9 23:50:46 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* regex.c (mbctab_sjis): 0x80 is not shift jis first byte.
diff --git a/math.c b/math.c
index 8d7bd8c53..526859875 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