From 1f06dd1185898fd0d23d839ab6f5fc436f0b4f04 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 29 Aug 2024 16:22:30 -0500 Subject: [PATCH] [libc] Do not include `langinfo.h` when using the LLVM C library Summary: The `langinfo.h` header is a POSIX extension, so ideally we would be able to build the C++ library without it. Currently the LLVM C library doesn't support / provide it. This allows us to build the C++ library with locales enabled. We can either disable it here, or just provide stubs that do nothing as in https://github.com/llvm/llvm-project/pull/106620. --- libcxx/src/locale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 4efdc63c09661..0f87c7099fe37 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 __has_include("") # include #endif