diff --git a/ChangeLog b/ChangeLog index aae738bd3b..f8d2b81b85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 6 22:41:31 2016 Nobuyoshi Nakada + + * configure.in (rb_cv_lgamma_r_m0): fix the condition for + lgamma_r(-0.0). [Bug #12249] + Wed Apr 6 17:38:42 2016 NAKAMURA Usaku * tool/downloader.rb (RubyGems.download): follow the change of the diff --git a/configure.in b/configure.in index 3454d3ae82..57f767c5f1 100644 --- a/configure.in +++ b/configure.in @@ -2516,8 +2516,11 @@ int main(int argc, char **argv) { int sign; + double x = lgamma_r(-0.0, &sign); - if (lgamma_r(-0.0, &sign) >= 0) return EXIT_FAILURE; + /* should be [+inf, -1] */ + if (x <= 0) return EXIT_FAILURE; + if (!isinf(x)) return EXIT_FAILURE; if (sign != -1) return EXIT_FAILURE; return EXIT_SUCCESS; }