[libcxx-commits] [PATCH] D111239: [libcxx][AIX] Explicitly include localedef.h in locale.cpp

David Tenty via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 6 09:24:05 PDT 2021


daltenty created this revision.
daltenty added reviewers: hubert.reinterpretcast, ZarkoCA.
daltenty requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This header was transitively included to provide the definition of
__lc_ctype_ptr that we use on AIX, but that is fragile as it depends on
the settings of compatibility macros, so we explicitly include it here
to avoid that scenario.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111239

Files:
  libcxx/src/locale.cpp


Index: libcxx/src/locale.cpp
===================================================================
--- libcxx/src/locale.cpp
+++ libcxx/src/locale.cpp
@@ -25,6 +25,10 @@
 #include "typeinfo"
 #include "vector"
 
+#ifdef _AIX
+#include <sys/localedef.h>
+#endif
+
 #if defined(_LIBCPP_MSVCRT)
 #   define _CTYPE_DISABLE_MACROS
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111239.377570.patch
Type: text/x-patch
Size: 332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211006/271566f5/attachment.bin>


More information about the libcxx-commits mailing list