Work around a bug in MinGW math.h.

Including standard math.h header with both -O2 and -std=c++NN options results
in compilation error due to a bug in the header, see MinGW bug report at
https://sourceforge.net/p/mingw/bugs/2250/

Work around this to allow the library to compile in release build with
-std=c++11. This is ugly but better than failing to compile at all.
This commit is contained in:
Vadim Zeitlin
2015-06-12 20:31:17 +02:00
parent cc774bb301
commit c8a3c01424

View File

@@ -15,6 +15,17 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifdef wxNEEDS_STRICT_ANSI_WORKAROUNDS
/*
In addition to declaring _finite() ourselves below, we also must work
around a compilation error in MinGW standard header itself, see
https://sourceforge.net/p/mingw/bugs/2250/
*/
#ifndef __NO_INLINE__
#define __NO_INLINE__
#endif
#endif
#include <math.h> #include <math.h>
#ifndef M_PI #ifndef M_PI