diff --git a/include/boost/predef/detail/platform_detected.h b/include/boost/predef/detail/platform_detected.h new file mode 100644 index 0000000..4faf693 --- /dev/null +++ b/include/boost/predef/detail/platform_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_DETAIL_PLAT_DETECTED +#define BOOST_PREDEF_DETAIL_PLAT_DETECTED 1 +#endif diff --git a/include/boost/predef/platform/mingw.h b/include/boost/predef/platform/mingw.h index f48e4c9..6c8d873 100644 --- a/include/boost/predef/platform/mingw.h +++ b/include/boost/predef/platform/mingw.h @@ -32,22 +32,28 @@ Version number available as major, minor, and patch. #if defined(__MINGW32__) || defined(__MINGW64__) # include <_mingw.h> -# undef BOOST_PLAT_MINGW -# if !defined(BOOST_PLAT_MINGW) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) -# define BOOST_PLAT_MINGW \ +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) # endif -# if !defined(BOOST_PLAT_MINGW) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) -# define BOOST_PLAT_MINGW \ +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0) # endif -# if !defined(BOOST_PLAT_MINGW) -# define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_AVAILABLE +# if !defined(BOOST_PLAT_MINGW_DETECTION) +# define BOOST_PLAT_MINGW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE # endif #endif -#if BOOST_PLAT_MINGW +#ifdef BOOST_PLAT_MINGW_DETECTION # define BOOST_PLAT_MINGW_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED) +# define BOOST_PLAT_MINGW_EMULATED BOOST_PLAT_MINGW_DETECTION +# else +# undef BOOST_PLAT_MINGW +# define BOOST_PLAT_MINGW BOOST_PLAT_MINGW_DETECTION +# endif +# include #endif #define BOOST_PLAT_MINGW_NAME "MinGW" @@ -55,5 +61,10 @@ Version number available as major, minor, and patch. #include BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME) +#ifdef BOOST_PLAT_MINGW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW_EMULATED,BOOST_PLAT_MINGW_NAME) +#endif + #endif