_LIBCPP_MSVCRT is defined because _WIN32 is defined and MINGW32 is not.
Some non-windows targets using MS extensions define _WIN32 for compatibility with Windows but do not have MSVC compatibility. This patch is an attempt to do not have _LIBCPP_MSVCRT defined for such targets, allowing libcxx to build. This patch seems the natural way to go for me, but others more experienced here might have additional suggestions?
You can combine this into just
I don't know if __MINGW32__ and _MSC_VER will ever be compiled simultaneously. (clang never defines _MSC_VER for its MinGW triples, for example.)