From 05ca5051e9515239eb320f404a555165d618991c Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 3 Nov 2015 13:47:28 +0200 Subject: Fix M_PI with -std=c++11 on Mingw The introduction of -std=c++11 breaks usage of M_PI in Mingw, but technically M_PI is not standard C or C++. Defining M_PI in units.h solves the issue. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- subsurface-core/units.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'subsurface-core') diff --git a/subsurface-core/units.h b/subsurface-core/units.h index 1273bd9bb..9d1b0fc8c 100644 --- a/subsurface-core/units.h +++ b/subsurface-core/units.h @@ -2,6 +2,9 @@ #define UNITS_H #include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif #ifdef __cplusplus extern "C" { -- cgit v1.2.3-70-g09d2