summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-11-03 13:47:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-03 07:19:05 -0800
commit05ca5051e9515239eb320f404a555165d618991c (patch)
tree748de27903e1d3656e4359429fa514fac2302b1f
parent4833d6bd725e1db6fc6592815483b19939ea7a95 (diff)
downloadsubsurface-05ca5051e9515239eb320f404a555165d618991c.tar.gz
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-core/units.h3
1 files changed, 3 insertions, 0 deletions
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 <math.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
#ifdef __cplusplus
extern "C" {