[llvm-branch-commits] [libcxx] ec17a7a - [libc++] Add missing xlocale.h include on Apple and FreeBSD (#99689)
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 26 00:29:38 PDT 2024
Author: Louis Dionne
Date: 2024-07-26T09:29:22+02:00
New Revision: ec17a7a75911547b4567bb16fca72042abd105ff
URL: https://github.com/llvm/llvm-project/commit/ec17a7a75911547b4567bb16fca72042abd105ff
DIFF: https://github.com/llvm/llvm-project/commit/ec17a7a75911547b4567bb16fca72042abd105ff.diff
LOG: [libc++] Add missing xlocale.h include on Apple and FreeBSD (#99689)
The `<locale>` header uses `strtoll_l` and friends which are defined in
`<xlocale.h>` on these platforms. While this works via transitive
includes when modules are disabled, this doesn't work anymore if the
platforms are modularized properly.
(cherry picked from commit a55df237375e98cfc2520d5eb1a23b302ef02ba0)
Added:
Modified:
libcxx/include/locale
Removed:
################################################################################
diff --git a/libcxx/include/locale b/libcxx/include/locale
index dbec23a2c936df..573910a85bef54 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -232,6 +232,10 @@ template <class charT> class messages_byname;
# include <__locale_dir/locale_base_api/bsd_locale_fallbacks.h>
# endif
+# if defined(__APPLE__) || defined(__FreeBSD__)
+# include <xlocale.h>
+# endif
+
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
More information about the llvm-branch-commits
mailing list