c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC
authorBrian Paul <brianp@vmware.com>
Thu, 26 Feb 2015 17:19:37 +0000 (10:19 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 26 Feb 2015 19:21:30 +0000 (12:21 -0700)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
include/c99_math.h

index 5d4f5359db413a52c0614ff01a7f8e6a0d3adfcb..0a359ebb7628224dd911c8517f3b5e462edc0dbe 100644 (file)
 
 #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))