aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-26 10:19:37 -0700
committerBrian Paul <[email protected]>2015-02-26 12:21:30 -0700
commit688d7656c58ea4775dbd55fe56193a27f4799c00 (patch)
tree38507588b89f73abbc5f3fc407ab26ed2716f89e /include
parentfb2ddef15793bf75bdc13c9de997100b4f1d7927 (diff)
c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/c99_math.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/c99_math.h b/include/c99_math.h
index 5d4f5359db4..0a359ebb762 100644
--- a/include/c99_math.h
+++ b/include/c99_math.h
@@ -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))