Skip to content
Browse files

* 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
  • Loading branch information...
1 parent 1ded4db commit 700aeee754648204314b644f24a75aaebe438ca7 ngoto committed Aug 5, 2011
Showing with 13 additions and 4 deletions.
  1. +7 −0 ChangeLog
  2. +3 −2 complex.c
  3. +3 −2 math.c
View
7 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.
View
5 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: {
View
5 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]))

0 comments on commit 700aeee

Please sign in to comment.
Something went wrong with that request. Please try again.