From c8a3c014249da3f3e4c70f03c67890cb236979ca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 12 Jun 2015 20:31:17 +0200 Subject: [PATCH] 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. --- include/wx/math.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/wx/math.h b/include/wx/math.h index ba298f17b0..c6aec42c4e 100644 --- a/include/wx/math.h +++ b/include/wx/math.h @@ -15,6 +15,17 @@ #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 #ifndef M_PI