diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | complex.c | 3 | ||||
-rw-r--r-- | math.c | 4 |
3 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Sun Jul 31 21:16:02 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does + not have it on header. + + * math.c: ditto. + Sun Jul 31 21:09:04 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp> * common.mk (node_name.inc): Use $(Q) for consistency. @@ -1173,6 +1173,9 @@ nucomp_eql_p(VALUE self, VALUE other) inline static VALUE f_signbit(VALUE x) { +#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun__) + extern int signbit(double x); +#endif switch (TYPE(x)) { case T_FLOAT: { double f = RFLOAT_VALUE(x); @@ -14,6 +14,10 @@ #include <math.h> #include <errno.h> +#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun__) + extern int signbit(double x); +#endif + #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) VALUE rb_mMath; |