summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 16:14:19 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 16:14:19 +0000
commit9f853b2e1b874a7ae19c46cdbbec1aeb0adb3b4c (patch)
treef0410b889d9c5363e2f3b7720be4595eca109390 /include
parent2d5eca7f505b852d6ab50a5c7aa4c05f601a18b5 (diff)
merge revision(s) 57762: [Backport #13267]
broken mingw * configure.in: check whether frexp and modf are broken. * include/ruby/win32.h (frexp, modf): ignore bad declarations when compiling as C++. [ruby-core:79859] [Bug #13267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/win32.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 89de30de72..03394d90f6 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -797,7 +797,8 @@ uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc
RUBY_SYMBOL_EXPORT_END
-#ifdef __MINGW_ATTRIB_PURE
+#if (defined(__MINGW64_VERSION_MAJOR) || defined(__MINGW64__)) && !defined(__cplusplus)
+#ifdef RUBY_MINGW64_BROKEN_FREXP_MODF
/* License: Ruby's */
/* get rid of bugs in math.h of mingw */
#define frexp(_X, _Y) __extension__ ({\
@@ -815,13 +816,6 @@ RUBY_SYMBOL_EXPORT_END
})
#endif
-#if defined(__cplusplus)
-#if 0
-{ /* satisfy cc-mode */
-#endif
-} /* extern "C" { */
-#endif
-
#if defined(__MINGW64__)
/*
* Use powl() instead of broken pow() of x86_64-w64-mingw32.
@@ -836,8 +830,14 @@ rb_w32_pow(double x, double y)
#elif defined(__MINGW64_VERSION_MAJOR)
double rb_w32_pow(double x, double y);
#endif
-#if defined(__MINGW64_VERSION_MAJOR) || defined(__MINGW64__)
#define pow rb_w32_pow
#endif
+#if defined(__cplusplus)
+#if 0
+{ /* satisfy cc-mode */
+#endif
+} /* extern "C" { */
+#endif
+
#endif /* RUBY_WIN32_H */