summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 05:15:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 05:15:30 +0000
commit9970b96af2388eeda481469dac0d03c1fddf549a (patch)
treeb1fc24a32ef8c8c50e2669a5942823357a61dacc
parent0b494041de37c9b7261ac5643b1b93147d3c6653 (diff)
merge revision(s) 43398,43407,43408,43417: [Backport #9044]
* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics functions. [ruby-core:57981] [Bug #9044] * include/ruby/win32.h (rb_infinity_float): suppress overflow in constant arithmetic warnings. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--include/ruby/win32.h14
-rw-r--r--version.h2
-rw-r--r--win32/Makefile.sub17
4 files changed, 41 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e2a81f4942..8e5bb43348 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Jan 29 14:08:54 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/win32.h (rb_infinity_float): suppress overflow in
+ constant arithmetic warnings. [ruby-core:57981] [Bug #9044]
+
+Wed Jan 29 14:08:54 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
+ functions. [ruby-core:57981] [Bug #9044]
+
Wed Jan 29 14:00:15 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 99382f48e3..2801697f16 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -315,6 +315,20 @@ extern FILE *rb_w32_fsopen(const char *, const char *, int);
#endif
#include <float.h>
+
+#if defined _MSC_VER && _MSC_VER >= 1800 && defined INFINITY
+#pragma warning(push)
+#pragma warning(disable:4756)
+static inline float
+rb_infinity_float(void)
+{
+ return INFINITY;
+}
+#pragma warning(pop)
+#undef INFINITY
+#define INFINITY rb_infinity_float()
+#endif
+
#if !defined __MINGW32__ || defined __NO_ISOCEXT
#ifndef isnan
#define isnan(x) _isnan(x)
diff --git a/version.h b/version.h
index 641659c242..0e4ad6a7a3 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 497
+#define RUBY_PATCHLEVEL 498
#define RUBY_RELEASE_DATE "2014-01-29"
#define RUBY_RELEASE_YEAR 2014
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 135c2dbcac..15a0f638c7 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -229,7 +229,10 @@ LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib imagehlp.lib
LIBS = unicows.lib $(LIBS)
!endif
!if !defined(MISSING)
-MISSING = acosh.obj cbrt.obj crypt.obj erf.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32/win32.obj win32/file.obj setproctitle.obj
+MISSING = crypt.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj win32/win32.obj win32/file.obj setproctitle.obj
+!if $(RT_VER) < 120
+MISSING = $(MISSING) acosh.obj cbrt.obj erf.obj tgamma.obj
+!endif
!endif
ARFLAGS = -machine:$(MACHINE) -out:
@@ -597,6 +600,18 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define GETGROUPS_T int
#define RETSIGTYPE void
#define TYPEOF_TIMEVAL_TV_SEC long
+!if $(RT_VER) >= 120
+#define HAVE_ACOSH 1
+#define HAVE_ASINH 1
+#define HAVE_ATANH 1
+#define HAVE_CBRT 1
+#define HAVE_LOG2 1
+#define log2(x) log2(x)
+#define HAVE_ERF 1
+#define HAVE_ERFC 1
+#define HAVE_ROUND 1
+#define HAVE_TGAMMA 1
+!endif
#define HAVE_ALLOCA 1
#define HAVE_DUP2 1
#define HAVE_MEMCMP 1