summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-05 07:03:21 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-05 07:03:21 +0000
commit700aeee754648204314b644f24a75aaebe438ca7 (patch)
treeb309e488f1c7311885f1bf34f744d8253911f334
parent1ded4dbd110868891d1255bc11845c1130a0ca3e (diff)
* 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
-rw-r--r--ChangeLog7
-rw-r--r--complex.c5
-rw-r--r--math.c5
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0829b3a9a6..602d0485b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Aug 5 15:57:10 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * complex.c (f_signbit): fix compile error in gcc4 on Solaris with
+ CFLAGS="-std=gnu99". [ruby-dev:44355] fix [Bug #5159]
+
+ * math.c: ditto.
+
Fri Aug 5 15:55:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/test_object.rb: tests that respond_to? returns false.
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: {
diff --git a/math.c b/math.c
index 98b327272b..276b2cbc49 100644
--- a/math.c
+++ b/math.c
@@ -14,8 +14,9 @@
#include <math.h>
#include <errno.h>
-#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
#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))