diff options
author | Kalev Lember <klember@redhat.com> | 2015-09-25 12:21:28 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-12-09 13:30:32 +0100 |
commit | d6194d4dc04bc22e893154119415a5751b5a93c7 (patch) | |
tree | 1bc251226a62dc1ed0009e3dc22052d39d167996 | |
parent | b7e86f5410e8924a6482096c0049b1e635eef5b7 (diff) |
Fix the build with MinGW headers
Guard _USE_MATH_DEFINES with _WIN32 instead of _MSC_VER as it is needed
for MinGW builds as well. While at this, also remove a duplicate version
of the exact same define a few lines below.
https://bugs.freedesktop.org/show_bug.cgi?id=92112
-rw-r--r-- | cairomm/context.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cairomm/context.cc b/cairomm/context.cc index 02336cd..c26f502 100644 --- a/cairomm/context.cc +++ b/cairomm/context.cc @@ -17,9 +17,9 @@ */ /* M_PI is defined in math.h in the case of Microsoft Visual C++ */ -#if defined(_MSC_VER) +#if defined(_WIN32) #define _USE_MATH_DEFINES -#endif +#endif #include <cairommconfig.h> #include <cairomm/context.h> @@ -29,11 +29,6 @@ #include <cairomm/script_surface.h> #include <cairomm/scaledfont.h> -/* M_PI is defined in math.h in the case of Microsoft Visual C++ */ -#if defined(_MSC_VER) -#define _USE_MATH_DEFINES -#endif - /* Solaris et. al. need math.h for M_PI too */ #include <cmath> |