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>
This commit is contained in:
Lubomir I. Ivanov 2015-11-03 13:47:28 +02:00 committed by Dirk Hohndel
parent 4833d6bd72
commit 05ca5051e9

View file

@ -2,6 +2,9 @@
#define UNITS_H
#include <math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifdef __cplusplus
extern "C" {