Skip to content

Commit f7871f5

Browse files
committed
[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 #106620.
1 parent 5c019bd commit f7871f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxx/src/locale.cpp

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

37-
#if !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__) && !defined(__BIONIC__) && !defined(__NuttX__)
37+
#if !defined(_LIBCPP_MSVCRT) && !defined(__MINGW32__) && !defined(__BIONIC__) && !defined(__NuttX__) || \
38+
defined(__LLVM_LIBC__)
3839
# include <langinfo.h>
3940
#endif
4041

0 commit comments

Comments
 (0)