diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2014-01-03 01:19:10 +0400 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2014-01-03 01:19:10 +0400 |
commit | 1c8a12ee61a00da103fe79bcc52f30a9a71bdc25 (patch) | |
tree | a2f7b158e96de33f64b2211d4cf0de4b1eaf4ca1 /source/blender/blenlib/BLI_math_base.h | |
parent | d0c6f14c73473579885ed0658dca3e3b6559ad2f (diff) |
Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index 99d9397f218..e2a5672b7ea 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -143,20 +143,27 @@ static const int NAN_INT = 0x7FC00000; #define copysignf(a, b) ((float)copysign(a, b)) #endif -#endif /* C99 or POSIX.1-2001 */ +#else /* C99 or POSIX.1-2001 */ #ifdef WIN32 # ifndef FREE_WINDOWS # ifndef isnan # define isnan(n) _isnan(n) # endif -# define finite _finite # ifndef hypot # define hypot(a, b) _hypot(a, b) # endif # endif #endif +#endif /* C99 or POSIX.1-2001 */ + +#ifdef WIN32 +# ifndef FREE_WINDOWS +# define finite _finite +# endif +#endif + /* Causes warning: * incompatible types when assigning to type 'Foo' from type 'Bar' * ... the compiler optimizes away the temp var */ |