From f9b3b49a3432f6d9a487dc57d8e206037b0e953f Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 25 Sep 2015 12:21:28 +0200 Subject: [PATCH] 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 --- cairomm/context.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cairomm/context.cc b/cairomm/context.cc index 9b74ca0..466f7e3 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 #include @@ -29,11 +29,6 @@ #include #include -/* 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 -- 2.5.0