[PATCH] D33082: Fix Libc++ build with MinGW64

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 10:04:33 PDT 2017


EricWF marked 6 inline comments as done.
EricWF added inline comments.


================
Comment at: include/__locale:370
     static const mask blank  = _ISblank;
-#elif defined(_LIBCPP_MSVCRT)
+#elif defined(_LIBCPP_WIN32API)
     typedef unsigned short mask;
----------------
compnerd wrote:
> Are these really Win32?  These are really more libc compatibility things I thought?
So `_LIBCPP_MSVCRT_LIKE`?


================
Comment at: include/stdio.h:113
 // snprintf
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCPP_WIN32API)
 extern "C" {
----------------
compnerd wrote:
> Again, I dont think that this is Win32 API related.  This is a libc implementation detail.  If I were to build libc++ against musl and Win32, these would be present, right?
Changing to `_LIBCPP_MSVCRT_LIKE`. 


================
Comment at: include/wchar.h:169
 
-#if defined(__cplusplus) && defined(_LIBCPP_MSVCRT)
+#if defined(__cplusplus) && defined(_LIBCPP_WIN32API) // Needed in MinGW as well
 extern "C" {
----------------
compnerd wrote:
> Again not sure that this is Win32 API specific.
Changed to `_LIBCPP_MSVCRT_LIKE`.


================
Comment at: src/system_error.cpp:68
 
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCPP_WIN32API)
 string do_strerror_r(int ev) {
----------------
compnerd wrote:
> I think that MSVCRT is more appropriate here.
Changed to `MSVCRT_LIKE`.


https://reviews.llvm.org/D33082





More information about the cfe-commits mailing list