Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -229,9 +229,12 @@ # define _LIBCPP_SHORT_WCHAR 1 // Both MinGW and native MSVC provide a "MSVC"-like enviroment # define _LIBCPP_MSVCRT_LIKE -// If mingw not explicitly detected, assume using MS C runtime only. +// If mingw not explicitly detected, assume using MS C runtime only if +// a MS compatibility version is specified. # ifndef __MINGW32__ -# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library +# ifdef _MSC_VER +# define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library +# endif # endif # if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__)) # define _LIBCPP_HAS_BITSCAN64