c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul 2015-02-26 10:19:37 -07:00
parent fb2ddef157
commit 688d7656c5

View File

@ -40,6 +40,11 @@
#if defined(_MSC_VER)
/* This is to ensure that we get M_PI, etc. definitions */
#if !defined(_USE_MATH_DEFINES)
#error _USE_MATH_DEFINES define required when building with MSVC
#endif
#if _MSC_VER < 1800
#define isfinite(x) _finite((double)(x))
#define isnan(x) _isnan((double)(x))