[libcxx-commits] [libcxx] [libc++] Use the new locale base API on Linux (PR #128007)
Brian Cain via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 25 06:30:16 PST 2025
androm3da wrote:
>The bridge functions for musl are still required and adding them to support/Linux.h fixes it:
Do you plan to create a PR with that change, @pirama-arumuga-nainar?
Note that I made a different change and it also seemed to be effective:
```
diff --git a/libcxx/include/__locale_dir/locale_base_api.h b/libcxx/include/__locale_dir/locale_base_api.h
index c1e73caeecce..f780137c37ca 100644
--- a/libcxx/include/__locale_dir/locale_base_api.h
+++ b/libcxx/include/__locale_dir/locale_base_api.h
@@ -111,6 +111,10 @@
// int __sscanf(const char*, __locale_t, const char*, ...); // required by the headers
// }
+# if defined(__wasi__) || _LIBCPP_HAS_MUSL_LIBC
+# include <__locale_dir/locale_base_api/musl.h>
+#endif
+
#if defined(__APPLE__)
# include <__locale_dir/support/apple.h>
#elif defined(__FreeBSD__)
@@ -131,8 +135,6 @@
# include <__locale_dir/locale_base_api/android.h>
# elif defined(__OpenBSD__)
# include <__locale_dir/locale_base_api/openbsd.h>
-# elif defined(__wasi__) || _LIBCPP_HAS_MUSL_LIBC
-# include <__locale_dir/locale_base_api/musl.h>
# endif
# include <__locale_dir/locale_base_api/bsd_locale_fallbacks.h>
```
https://github.com/llvm/llvm-project/pull/128007
More information about the libcxx-commits
mailing list