mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32.h: suppress INFINITY warnings
* 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/trunk@43408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
33945edf39
commit
a0c67155a0
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Oct 24 01:34:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/win32.h (rb_infinity_float): suppress overflow in
|
||||
constant arithmetic warnings. [ruby-core:57981] [Bug #9044]
|
||||
|
||||
Thu Oct 24 00:11:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* lib/ostruct.rb: raise NoMethodError with a #name and #args.
|
||||
|
|
|
@ -355,6 +355,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)
|
||||
|
|
Loading…
Reference in a new issue