From 700aeee754648204314b644f24a75aaebe438ca7 Mon Sep 17 00:00:00 2001 From: ngoto Date: Fri, 5 Aug 2011 07:03:21 +0000 Subject: * complex.c (f_signbit): fix compile error in gcc4 on Solaris with CFLAGS="-std=gnu99". [ruby-dev:44355] fix [Bug #5159] * math.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index a21249681f..4be8099ed6 100644 --- a/complex.c +++ b/complex.c @@ -1173,8 +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); +#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun__) && \ + !defined(signbit) + extern int signbit(double); #endif switch (TYPE(x)) { case T_FLOAT: { -- cgit v1.2.3