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

ruby-changes:43055

From: usa <ko1@a...>
Date: Mon, 23 May 2016 15:55:54 +0900 (JST)
Subject: [ruby-changes:43055] usa:r55129 (trunk): * ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always

usa	2016-05-23 15:55:48 +0900 (Mon, 23 May 2016)

  New Revision: 55129

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55129

  Log:
    * ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
      exist.  fixed build error on Windows itroduced at r55123.
    
    I found that more complex definition of isfinite in numeric.c.
    But it's unused because it inplicitly checks not defined _WIN32.
    I don't know why the code do that.
    IMO, the definition of isfinite should be put at missing.h.

  Modified files:
    trunk/ChangeLog
    trunk/ext/bigdecimal/bigdecimal.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55128)
+++ ChangeLog	(revision 55129)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon May 23 15:52:07 2016  NAKAMURA Usaku  <usa@r...>
+
+	* ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
+	  exist.  fixed build error on Windows itroduced at r55123.
+
 Mon May 23 13:19:41 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* include/ruby/ruby.h (rb_scan_args0): make compile error if the
Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c	(revision 55128)
+++ ext/bigdecimal/bigdecimal.c	(revision 55129)
@@ -30,6 +30,10 @@ https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L30
 #include <ieeefp.h>
 #endif
 
+#if !defined(HAVE_ISFINITE) && defined(HAVE_FINITE)
+# define isfinite(x) finite(x)
+#endif
+
 /* #define ENABLE_NUMERIC_STRING */
 
 #define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \

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

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