-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Add missing xlocale.h include on Apple and FreeBSD #99689
Conversation
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.
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThe <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. Full diff: https://github.com/llvm/llvm-project/pull/99689.diff 1 Files Affected:
diff --git a/libcxx/include/locale b/libcxx/include/locale
index dbec23a2c936d..573910a85bef5 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should export this from locale_base_api.h
. That's what the header is for.
Even with |
Could the problem be that we don't actually include the base API in |
No, I tried that and it doesn't help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, in that case let's ship this now and find a proper fix later.
/cherry-pick a55df23 |
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 a55df23)
/pull-request #100604 |
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250520
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 a55df23)
The
<locale>
header usesstrtoll_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.