From 921ff3029b87f51f701e71cdea9721fb1eafcb53 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 23 May 2016 06:55:48 +0000 Subject: * 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 --- ChangeLog | 5 +++++ ext/bigdecimal/bigdecimal.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5a92c53db4..aa7578312c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 23 15:52:07 2016 NAKAMURA Usaku + + * 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 * 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 #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) ( \ -- cgit v1.2.3