From 7fc0ffc7ac65d7c49db15dca0d420abb8c59cb27 Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 10 Jul 2003 05:48:43 +0000 Subject: * 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 --- math.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'math.c') 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 +# 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 -- cgit