Permalink
Browse files

compat.h: Define M_PI if not defined

A newer gcc does not define that constant in c++0x mode, because
it's not in the standard. See
http://gcc.gnu.org/ml/libstdc++/2009-05/msg00091.html
  • Loading branch information...
1 parent 61a1edd commit f9a156f79a3c14cd7dc6143af23e31dab5225225 @mgehre mgehre committed May 21, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/compat.h
View
@@ -27,6 +27,11 @@
#include <assert.h>
#include <cstdint>
#include <iostream>
+#include <math.h>
+
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
// TODO: This should be reworked to use CMake feature detection where possible
/* gettext support */
@@ -43,9 +48,7 @@
#define NOMINMAX
#endif
#define WIN32_LEAN_AND_MEAN
-//#include <winsock2.h>
#include <windows.h>
-#include <math.h>
#include <io.h>
#undef DOUBLE_CLICK
#undef RGB

0 comments on commit f9a156f

Please sign in to comment.