Skip to content

Commit 109bff1

Browse files
authored
[libcxx] Do not include langinfo.h when using the LLVM C library (#106634)
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 #106620.
1 parent 9adf811 commit 109bff1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/src/locale.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# define _CTYPE_DISABLE_MACROS
3535
#endif
3636

37-
#if !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__) && !defined(__BIONIC__) && !defined(__NuttX__)
37+
#if __has_include("<langinfo.h>")
3838
# include <langinfo.h>
3939
#endif
4040

0 commit comments

Comments
 (0)