diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-29 05:15:30 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-29 05:15:30 +0000 |
commit | 9970b96af2388eeda481469dac0d03c1fddf549a (patch) | |
tree | b1fc24a32ef8c8c50e2669a5942823357a61dacc /include | |
parent | 0b494041de37c9b7261ac5643b1b93147d3c6653 (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
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/win32.h | 14 |
1 files changed, 14 insertions, 0 deletions
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) |