ruby-changes:34649
From: usa <ko1@a...>
Date: Mon, 7 Jul 2014 12:00:07 +0900 (JST)
Subject: [ruby-changes:34649] usa:r46732 (ruby_2_0_0): merge revision(s) 44505: [Backport #9994]
usa 2014-07-07 12:00:01 +0900 (Mon, 07 Jul 2014) New Revision: 46732 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46732 Log: merge revision(s) 44505: [Backport #9994] numeric.c: isfinite * numeric.c (flo_is_finite_p): prefer C99 standard isfinite() than deprecated finite(). Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/configure.in branches/ruby_2_0_0/numeric.c branches/ruby_2_0_0/version.h Index: ruby_2_0_0/configure.in =================================================================== --- ruby_2_0_0/configure.in (revision 46731) +++ ruby_2_0_0/configure.in (revision 46732) @@ -1674,7 +1674,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/configure.in#L1674 setuid setgid daemon select_large_fdset setenv unsetenv\ mktime timegm gmtime_r clock_gettime gettimeofday poll ppoll\ pread sendfile shutdown sigaltstack dl_iterate_phdr\ - dup dup3 pipe2 posix_memalign memalign ioctl) + dup dup3 pipe2 posix_memalign memalign ioctl isfinite) AC_CACHE_CHECK(for unsetenv returns a value, rb_cv_unsetenv_return_value, [AC_TRY_COMPILE([ Index: ruby_2_0_0/numeric.c =================================================================== --- ruby_2_0_0/numeric.c (revision 46731) +++ ruby_2_0_0/numeric.c (revision 46732) @@ -30,6 +30,14 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/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 */ #ifndef FLT_RADIX #define FLT_RADIX 2 @@ -1482,8 +1490,8 @@ flo_is_finite_p(VALUE num) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/numeric.c#L1490 { 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_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 46731) +++ ruby_2_0_0/version.h (revision 46732) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-07-07" -#define RUBY_PATCHLEVEL 516 +#define RUBY_PATCHLEVEL 517 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 7 Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44505 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/