diff --git a/system/include/compat/xlocale.h b/system/include/compat/xlocale.h deleted file mode 100644 index 52b9b26a05f89..0000000000000 --- a/system/include/compat/xlocale.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _COMPAT_XLOCALE_H_ -#define _COMPAT_XLOCALE_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -long long strtoll_l(const char *start, char **end, int base, locale_t loc); -unsigned long long strtoull_l(const char *start, char **end, int base, locale_t loc); -long double strtold_l(const char *start, char **end, locale_t loc); - -#ifdef __cplusplus -} -#endif - -#endif /* _COMPAT_XLOCALE_H_ */ - diff --git a/system/lib/libc/compat/strtol_l.c b/system/lib/libc/compat/strtol_l.c deleted file mode 100644 index 58b46186941c2..0000000000000 --- a/system/lib/libc/compat/strtol_l.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -unsigned long long strtoull_l(const char *restrict s, char **restrict p, int base, locale_t loc) -{ - return strtoull(s, p, base); -} - -long long strtoll_l(const char *restrict s, char **restrict p, int base, locale_t loc) -{ - return strtoll(s, p, base); -} - -unsigned long strtoul_l(const char *restrict s, char **restrict p, int base, locale_t loc) -{ - return strtoul(s, p, base); -} - -long strtol_l(const char *restrict s, char **restrict p, int base, locale_t loc) -{ - return strtol(s, p, base); -} diff --git a/system/lib/libcxx/include/__config_site b/system/lib/libcxx/include/__config_site index ff95a7c8dc819..8d048d8ecf080 100644 --- a/system/lib/libcxx/include/__config_site +++ b/system/lib/libcxx/include/__config_site @@ -2,3 +2,4 @@ // data and other nice fixes. #define _LIBCPP_ABI_VERSION 2 #define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS +#define _LIBCPP_HAS_MUSL_LIBC diff --git a/system/lib/libcxx/include/__locale b/system/lib/libcxx/include/__locale index 51f35eece7121..08db4bcbe01e8 100644 --- a/system/lib/libcxx/include/__locale +++ b/system/lib/libcxx/include/__locale @@ -34,8 +34,7 @@ # include <__support/newlib/xlocale.h> #elif defined(__OpenBSD__) # include <__support/openbsd/xlocale.h> -#elif (defined(__APPLE__) || defined(__FreeBSD__) \ - || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) +#elif (defined(__APPLE__) || defined(__FreeBSD__) || defined(__IBMCPP__)) # include #elif defined(__Fuchsia__) # include <__support/fuchsia/xlocale.h> diff --git a/system/lib/libcxx/src/include/config_elast.h b/system/lib/libcxx/src/include/config_elast.h index e516e07a755cd..bef26ec5019ec 100644 --- a/system/lib/libcxx/src/include/config_elast.h +++ b/system/lib/libcxx/src/include/config_elast.h @@ -29,12 +29,12 @@ // No _LIBCPP_ELAST needed on Fuchsia #elif defined(__wasi__) // No _LIBCPP_ELAST needed on WASI +#elif defined(__EMSCRIPTEN__) +// No _LIBCPP_ELAST needed on Emscripten #elif defined(__linux__) || defined(_LIBCPP_HAS_MUSL_LIBC) #define _LIBCPP_ELAST 4095 #elif defined(__APPLE__) // No _LIBCPP_ELAST needed on Apple -#elif defined(__EMSCRIPTEN__) -// No _LIBCPP_ELAST needed on Emscripten #elif defined(__sun__) #define _LIBCPP_ELAST ESTALE #elif defined(__MVS__)