summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-24 07:34:51 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-24 07:34:51 +0000
commit0414c9b901a3764b7cdb549d3273e7e54210c8ff (patch)
tree8d7fa00ebb22bf05aeed017ff3d5638b96e97dff
parent5841efa380f9fe76b09588fbbc09d17acb0f24ed (diff)
merge revision(s) 36522: [Backport #7016]
* include/ruby/win32.h (rb_w32_pow): add new function. We use powl() instead of broken pow() for x64-mingw32. This workaround fixes test failures related to floating point numeric. [ruby-core:46686] [Bug #6784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--include/ruby/win32.h14
-rw-r--r--version.h2
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fc9194aca7..09cfef7226 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Sep 24 16:34:07 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * include/ruby/win32.h (rb_w32_pow): add new function.
+ We use powl() instead of broken pow() for x64-mingw32. This workaround
+ fixes test failures related to floating point numeric.
+ [ruby-core:46686] [Bug #6784]
+
Mon Sep 24 10:38:55 2012 Luis Lavena <luislavena@gmail.com>
* test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 99cdea1fc3..99382f48e3 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -756,4 +756,18 @@ uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc
} /* extern "C" { */
#endif
+#ifdef __MINGW64__
+/*
+ * Use powl() instead of broken pow() of x86_64-w64-mingw32.
+ * This workaround will fix test failures in test_bignum.rb,
+ * test_fixnum.rb and test_float.rb etc.
+ */
+static inline double
+rb_w32_pow(double x, double y)
+{
+ return powl(x, y);
+}
+#define pow rb_w32_pow
+#endif
+
#endif /* RUBY_WIN32_H */
diff --git a/version.h b/version.h
index 9bad447a75..2082c6143b 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 275
+#define RUBY_PATCHLEVEL 276
#define RUBY_RELEASE_DATE "2012-09-24"
#define RUBY_RELEASE_YEAR 2012