diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-23 06:55:48 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-23 06:55:48 +0000 |
commit | 921ff3029b87f51f701e71cdea9721fb1eafcb53 (patch) | |
tree | fec603b1def86cca003827f6049e09e4cb207eba | |
parent | 3d18ceab9a7054266fec1292a1b35ec96c6997bc (diff) | |
download | ruby-921ff3029b87f51f701e71cdea9721fb1eafcb53.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon May 23 15:52:07 2016 NAKAMURA Usaku <usa@ruby-lang.org> + + * 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@ruby-lang.org> * include/ruby/ruby.h (rb_scan_args0): make compile error if the diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 3ccad9a508..1354242b0b 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -30,6 +30,10 @@ #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) ( \ |