From 688d7656c58ea4775dbd55fe56193a27f4799c00 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 26 Feb 2015 10:19:37 -0700 Subject: c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC Reviewed-by: Jose Fonseca --- include/c99_math.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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)) -- cgit v1.2.3