[libcxx-commits] [PATCH] D150015: [libc++] Consistently enable __CORRECT_ISO_CPP_WCHAR_H_PROTO in mbstate.
Fangrui Song via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 5 21:17:12 PDT 2023
MaskRay accepted this revision.
MaskRay added a comment.
- `iosfwd` includes `__std_mbstate_t.h`, which includes `__mbstate_t.h`, which includes glibc `wchar.h` without defining `__CORRECT_ISO_CPP_WCHAR_H_PROTO`.
- `cwchar` includes `wchar.h`, which defines `__CORRECT_ISO_CPP_WCHAR_H_PROTO` and then includes glibc `wchar.h`.
If glibc `wchar.h` doesn't define `__CORRECT_ISO_CPP_WCHAR_H_PROTO` itself, we will get mismatching declarations.
Before 2019-12, glibc `wchar.h` didn't define `__CORRECT_ISO_CPP_WCHAR_H_PROTO` (https://sourceware.org/bugzilla/show_bug.cgi?id=25232).
The patch looks good to me. I think we need the `#define __CORRECT_ISO_CPP_WCHAR_H_PROTO` everywhere before `# include_next <wchar.h>`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150015/new/
https://reviews.llvm.org/D150015
More information about the libcxx-commits
mailing list