[前][次][番号順一覧][スレッド一覧]

ruby-changes:24972

From: naruse <ko1@a...>
Date: Mon, 24 Sep 2012 16:35:01 +0900 (JST)
Subject: [ruby-changes:24972] naruse:r37024 (ruby_1_9_3): merge revision(s) 36522: [Backport #7016]

naruse	2012-09-24 16:34:51 +0900 (Mon, 24 Sep 2012)

  New Revision: 37024

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37024

  Log:
    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]

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/include/ruby/win32.h
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/include/ruby/win32.h
===================================================================
--- ruby_1_9_3/include/ruby/win32.h	(revision 37023)
+++ ruby_1_9_3/include/ruby/win32.h	(revision 37024)
@@ -756,4 +756,18 @@
 }  /* 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 */
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 37023)
+++ ruby_1_9_3/ChangeLog	(revision 37024)
@@ -1,3 +1,10 @@
+Mon Sep 24 16:34:07 2012  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* 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@g...>
 
 	* test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 37023)
+++ ruby_1_9_3/version.h	(revision 37024)
@@ -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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]