[libcxx-commits] [libcxx] [libcxx] Add `locale` support for llvm `libc` (PR #97508)
Izaak Schroeder via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 2 20:08:42 PDT 2024
https://github.com/izaakschroeder created https://github.com/llvm/llvm-project/pull/97508
`libcxx` companion to https://github.com/llvm/llvm-project/pull/97494 and https://github.com/llvm/llvm-project/issues/97191
>From 51d04ae250db60205aac97c8d0ef5c54ac60af09 Mon Sep 17 00:00:00 2001
From: Izaak Schroeder <izaak.schroeder at gmail.com>
Date: Tue, 2 Jul 2024 13:38:47 -0700
Subject: [PATCH] [libcxx] Add `locale` support for llvm `libc`
---
libcxx/include/__config | 2 +-
libcxx/include/locale | 2 +-
libcxx/src/locale.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index dfb14fd6a380c..f3dbb8079a1e8 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -914,7 +914,7 @@ typedef __char32_t char32_t;
# endif
# if defined(__BIONIC__) || defined(__NuttX__) || defined(__Fuchsia__) || defined(__wasi__) || \
- defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__)
+ defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__) || defined(__LLVM_LIBC__)
# define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
# endif
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 19e81e110b69c..46318683b3cef 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -217,7 +217,7 @@ template <class charT> class messages_byname;
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
// Most unix variants have catopen. These are the specific ones that don't.
-# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__)
+# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__) && !defined(__LLVM_LIBC__)
# define _LIBCPP_HAS_CATOPEN 1
# include <nl_types.h>
# endif
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 4efdc63c09661..d114640ab7104 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -34,7 +34,7 @@
# define _CTYPE_DISABLE_MACROS
#endif
-#if !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__) && !defined(__BIONIC__) && !defined(__NuttX__)
+#if !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__) && !defined(__BIONIC__) && !defined(__NuttX__) && !defined(__LLVM_LIBC__)
# include <langinfo.h>
#endif
More information about the libcxx-commits
mailing list