[Mesa-dev] [PATCH] c99: in c99_math.h check that _USE_MATH_DEFINES is defined with MSVC
Brian Paul
brianp at vmware.com
Thu Feb 26 09:48:06 PST 2015
---
include/c99_math.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/c99_math.h b/include/c99_math.h
index 5d4f535..bec80e1 100644
--- a/include/c99_math.h
+++ b/include/c99_math.h
@@ -38,6 +38,12 @@
#include "c99_compat.h"
+/* This is to ensure that we get M_PI, etc. definitions */
+#if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES)
+#error _USE_MATH_DEFINES define required when building with MSVC
+#endif
+
+
#if defined(_MSC_VER)
#if _MSC_VER < 1800
--
1.9.1
More information about the mesa-dev
mailing list