Reintroduce M_PI compatibility

M_PI is not part of C99 or C++ and thus aren't provided in all configurations.
This used to be handled in reference_math.c directly but was recently removed.
Just tweak the M_PI handling in the compatibility headers to restore builds.
This commit is contained in:
Alastair Murray
2019-08-02 17:46:16 +01:00
committed by Kévin Petit
parent ef832c330c
commit 85d474f06a

View File

@@ -117,16 +117,16 @@ typedef long long int64_t;
#include <math.h>
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
#if defined( _MSC_VER )
#ifdef __cplusplus
extern "C" {
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
#ifndef NAN
#define NAN (INFINITY - INFINITY)
#endif