Skip to content

Commit

Permalink
compat.h: Define M_PI if not defined
Browse files Browse the repository at this point in the history
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
mgehre committed May 21, 2012
1 parent 61a1edd commit f9a156f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/compat.h
Expand Up @@ -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 */
Expand All @@ -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
Expand Down

0 comments on commit f9a156f

Please sign in to comment.