[前][次][番号順一覧][スレッド一覧]

ruby-changes:20730

From: yugui <ko1@a...>
Date: Sun, 31 Jul 2011 21:23:43 +0900 (JST)
Subject: [ruby-changes:20730] yugui:r32777 (ruby_1_9_3): * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does

yugui	2011-07-31 21:21:54 +0900 (Sun, 31 Jul 2011)

  New Revision: 32777

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32777

  Log:
    * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does
      not have it on header.
    
    * math.c: ditto.

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/complex.c
    branches/ruby_1_9_3/math.c

Index: ruby_1_9_3/complex.c
===================================================================
--- ruby_1_9_3/complex.c	(revision 32776)
+++ ruby_1_9_3/complex.c	(revision 32777)
@@ -1173,6 +1173,9 @@
 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);
Index: ruby_1_9_3/math.c
===================================================================
--- ruby_1_9_3/math.c	(revision 32776)
+++ ruby_1_9_3/math.c	(revision 32777)
@@ -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;
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 32776)
+++ ruby_1_9_3/ChangeLog	(revision 32777)
@@ -1,3 +1,10 @@
+Sun Jul 31 21:16:02 2011  Yuki Sonoda (Yugui)  <yugui@y...>
+
+	* 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@y...>
 
 	* common.mk (node_name.inc): Use $(Q) for consistency.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]