diff --git a/ChangeLog b/ChangeLog index 045a5bddea..44405ab7b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 12 09:43:11 2010 NARUSE, Yui + + * complex.c (f_signbit): remove condition for signbit because + all platforms have signbit from r26871. + Fri Mar 12 07:25:16 2010 Nobuyoshi Nakada * win32/win32.c (init_env): get rid of alloca() for outer string. diff --git a/complex.c b/complex.c index eee1186d8f..64ea345862 100644 --- a/complex.c +++ b/complex.c @@ -1154,28 +1154,13 @@ nucomp_eql_p(VALUE self, VALUE other) return Qfalse; } -#ifndef HAVE_SIGNBIT -#ifdef signbit -#define HAVE_SIGNBIT 1 -#endif -#endif - inline static VALUE f_signbit(VALUE x) { switch (TYPE(x)) { case T_FLOAT: { -#ifdef HAVE_SIGNBIT double f = RFLOAT_VALUE(x); return f_boolcast(!isnan(f) && signbit(f)); -#else - char s[2]; - double f = RFLOAT_VALUE(x); - - if (isnan(f)) return Qfalse; - (void)snprintf(s, sizeof s, "%.0f", f); - return f_boolcast(s[0] == '-'); -#endif } } return f_negative_p(x);