[libcxx-commits] [PATCH] D150015: [libc++] Consistently enable __CORRECT_ISO_CPP_WCHAR_H_PROTO in mbstate.
Jordan Rupprecht via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 10 06:59:26 PDT 2023
rupprecht updated this revision to Diff 520982.
rupprecht added a comment.
Restore to v1 of the patch
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150015/new/
https://reviews.llvm.org/D150015
Files:
libcxx/include/__mbstate_t.h
Index: libcxx/include/__mbstate_t.h
===================================================================
--- libcxx/include/__mbstate_t.h
+++ libcxx/include/__mbstate_t.h
@@ -27,6 +27,12 @@
// This does not define std::mbstate_t -- this only brings in the declaration
// in the global namespace.
+// Consistently set this the same as in libc++'s <wchar.h> header to avoid
+// different function signatures.
+#ifdef __cplusplus
+# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
+#endif
+
#if __has_include(<bits/types/mbstate_t.h>)
# include <bits/types/mbstate_t.h> // works on most Unixes
#elif __has_include(<sys/_types/_mbstate_t.h>)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150015.520982.patch
Type: text/x-patch
Size: 638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230510/0e531cfc/attachment.bin>
More information about the libcxx-commits
mailing list