From 0b0c0536d6f367768152a91799e7ea1eb02f91c6 Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Tue, 26 Mar 2019 21:02:08 +0300 Subject: [PATCH] The right hypot fix for MinGW --- include/boost/python/detail/wrap_python.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/boost/python/detail/wrap_python.hpp b/include/boost/python/detail/wrap_python.hpp index c0748ddf..13679dbb 100644 --- a/include/boost/python/detail/wrap_python.hpp +++ b/include/boost/python/detail/wrap_python.hpp @@ -47,6 +47,13 @@ # endif #endif +// pyconfig.h defines a macro with hypot name, what breaks libstdc++ math headers +// that Python.h tries to include afterwards. +#if defined(__MINGW32__) +# include +# include +#endif + # include # if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION >= 740 # undef _POSIX_C_SOURCE @@ -84,12 +91,6 @@ // #if defined(_WIN32) || defined(__CYGWIN__) -// Python.h defines a macro with hypot name, what breaks libstdc++ math header -// that it tries to include afterwards. -# if defined(__MINGW32__) -# include -# endif - # if defined(__GNUC__) && defined(__CYGWIN__) # if defined(__LP64__)