improve support of MinGW-w64

This commit is contained in:
Jinhao 2015-12-17 00:07:44 +08:00
parent 1d9b75b1c2
commit 54ca38d575

View File

@ -67,20 +67,32 @@
// google: That's a known issue, tracked by an active bug (DevDiv#1060849). We were able to update the STL's headers in response to char16_t/char32_t, but we still need to update the separately compiled sources. // google: That's a known issue, tracked by an active bug (DevDiv#1060849). We were able to update the STL's headers in response to char16_t/char32_t, but we still need to update the separately compiled sources.
#define STD_CODECVT_NOT_SUPPORTED #define STD_CODECVT_NOT_SUPPORTED
#endif // _MSC_VER == 1900 #endif // _MSC_VER == 1900
#endif // _MSVC
#if defined(__clang__) #elif defined(__clang__) //Clang
#include <iosfwd> //Introduces some implement-specific flags of ISO C++ Library
#if defined(__GLIBCPP__) || defined(__GLIBCXX__) #if defined(__GLIBCPP__) || defined(__GLIBCXX__)
//<codecvt> is a known issue on libstdc++, it works on libc++ //<codecvt> is a known issue on libstdc++, it works on libc++
#define STD_CODECVT_NOT_SUPPORTED #define STD_CODECVT_NOT_SUPPORTED
#endif #endif
#elif defined(__GNUC__) //GCC #elif defined(__GNUC__) //GCC
#include <iosfwd> //Introduces some implement-specific flags of ISO C++ Library
#if defined(__GLIBCPP__) || defined(__GLIBCXX__) #if defined(__GLIBCPP__) || defined(__GLIBCXX__)
//<codecvt> is a known issue on libstdc++, it works on libc++ //<codecvt> is a known issue on libstdc++, it works on libc++
#define STD_CODECVT_NOT_SUPPORTED #define STD_CODECVT_NOT_SUPPORTED
#endif
//It's a known issue of libstdc++ on MinGW
//introduce to_string/to_wstring workarounds for disabled capacity of stdlib
#ifdef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
#if (__GNUC__ < 5)
# define STD_TO_STRING_NOT_SUPPORTED
#endif
#define STD_TO_WSTRING_NOT_SUPPORTED
#endif
#endif
#if (__GNUC__ == 4) #if (__GNUC__ == 4)
#if ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1)) #if ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1))
@ -91,26 +103,22 @@
//boost.thread will be replaced with meganz's mingw-std-threads. //boost.thread will be replaced with meganz's mingw-std-threads.
// https://github.com/meganz/mingw-std-threads // https://github.com/meganz/mingw-std-threads
//#define USE_github_com_meganz_mingw_std_threads //#define USE_github_com_meganz_mingw_std_threads
#define STD_TO_STRING_NOT_SUPPORTED
#endif #endif
//_GLIBCXX_HAVE_BROKEN_VSWPRINTF is enabled to turn off all numeric conversions on MinGW(GCC 4)
#if defined(NANA_MINGW) #if defined(NANA_MINGW)
//It's a knonwn issue under MinGW //It's a knonwn issue under MinGW
#define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED #define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
#endif #endif
#if ((__GNUC_MINOR__ < 8) || defined(NANA_MINGW)) #if (__GNUC_MINOR__ < 8)
#define STD_TO_STRING_NOT_SUPPORTED //introduce to_string/to_wstring workaround for lack of stdlib definitions
#define STD_TO_WSTRING_NOT_SUPPORTED #ifndef STD_TO_STRING_NOT_SUPPORTED
#endif # define STD_TO_STRING_NOT_SUPPORTED
#elif (__GNUC__ == 5) #endif
#if defined(NANA_MINGW)
//The _GLIBCXX_HAVE_BROKEN_VSWPRINTF only applies to wide string #ifndef STD_TO_WSTRING_NOT_SUPPORTED
//It's a knonwn issue under MinGW # define STD_TO_WSTRING_NOT_SUPPORTED
#define STD_TO_WSTRING_NOT_SUPPORTED #endif
#endif #endif
#endif #endif
#endif #endif