ruby-changes:34529
From: nagachika <ko1@a...>
Date: Mon, 30 Jun 2014 02:09:16 +0900 (JST)
Subject: [ruby-changes:34529] nagachika:r46610 (ruby_2_1): merge revision(s) r44505: [Backport #9994]
nagachika 2014-06-30 02:09:10 +0900 (Mon, 30 Jun 2014) New Revision: 46610 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46610 Log: merge revision(s) r44505: [Backport #9994] numeric.c: isfinite * numeric.c (flo_is_finite_p): prefer C99 standard isfinite() than deprecated finite(). Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/configure.in branches/ruby_2_1/numeric.c branches/ruby_2_1/version.h Index: ruby_2_1/configure.in =================================================================== --- ruby_2_1/configure.in (revision 46609) +++ ruby_2_1/configure.in (revision 46610) @@ -1900,6 +1900,7 @@ AC_CHECK_FUNCS(gettimeofday) # for maki https://github.com/ruby/ruby/blob/trunk/ruby_2_1/configure.in#L1900 AC_CHECK_FUNCS(gmtime_r) AC_CHECK_FUNCS(initgroups) AC_CHECK_FUNCS(ioctl) +AC_CHECK_FUNCS(isfinite) AC_CHECK_FUNCS(issetugid) AC_CHECK_FUNCS(killpg) AC_CHECK_FUNCS(lchmod) Index: ruby_2_1/numeric.c =================================================================== --- ruby_2_1/numeric.c (revision 46609) +++ ruby_2_1/numeric.c (revision 46610) @@ -30,8 +30,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/numeric.c#L30 #include <ieeefp.h> #endif +#if !defined HAVE_ISFINITE && !defined isfinite #if defined HAVE_FINITE && !defined finite && !defined _WIN32 extern int finite(double); +# define HAVE_ISFINITE 1 +# define isfinite(x) finite(x) +#endif #endif /* use IEEE 64bit values if not defined */ @@ -1457,8 +1461,8 @@ flo_is_finite_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/numeric.c#L1461 { double value = RFLOAT_VALUE(num); -#if HAVE_FINITE - if (!finite(value)) +#if HAVE_ISFINITE + if (!isfinite(value)) return Qfalse; #else if (isinf(value) || isnan(value)) Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 46609) +++ ruby_2_1/version.h (revision 46610) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.2" #define RUBY_RELEASE_DATE "2014-06-30" -#define RUBY_PATCHLEVEL 147 +#define RUBY_PATCHLEVEL 148 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 6 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44505 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/