From 3d7fa44b05482818a954e04dfb6e5311e1b790b8 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 8 Jul 2013 14:13:13 +0000 Subject: win32.c: for strict ANSI * win32/win32.c (rb_w32_pow): move from win32.h and disable strict ANSI mode macro to let _controlfp() stuff defined. [ruby-core:55312] [Bug #8495] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/win32.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'include/ruby/win32.h') diff --git a/include/ruby/win32.h b/include/ruby/win32.h index efb9c8d551..809784d1c8 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -794,21 +794,7 @@ rb_w32_pow(double x, double y) return powl(x, y); } #elif defined(__MINGW64_VERSION_MAJOR) -/* - * Set floating point precision for pow() of mingw-w64 x86. - * With default precision the result is not proper on WinXP. - */ -static inline double -rb_w32_pow(double x, double y) -{ - double r; - unsigned int default_control = _controlfp(0, 0); - _controlfp(_PC_64, _MCW_PC); - r = pow(x, y); - /* Restore setting */ - _controlfp(default_control, _MCW_PC); - return r; -} +double rb_w32_pow(double x, double y); #endif #if defined(__MINGW64_VERSION_MAJOR) || defined(__MINGW64__) #define pow rb_w32_pow -- cgit v1.2.3