[libcxx-commits] [PATCH] D126583: [libcxx] Minor emscripten changes from downstream
Sam Clegg via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 27 19:13:06 PDT 2022
sbc100 created this revision.
Herald added subscribers: wingo, krytarowski.
Herald added a project: All.
sbc100 requested review of this revision.
Herald added subscribers: libcxx-commits, aheejin.
Herald added a project: libc++.
Herald added a reviewer: libc++.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126583
Files:
libcxx/include/__config
libcxx/include/__locale
libcxx/include/locale
libcxx/src/include/config_elast.h
Index: libcxx/src/include/config_elast.h
===================================================================
--- libcxx/src/include/config_elast.h
+++ libcxx/src/include/config_elast.h
@@ -29,6 +29,8 @@
// 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__)
Index: libcxx/include/locale
===================================================================
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -211,7 +211,7 @@
#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)
+# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__)
# define _LIBCPP_HAS_CATOPEN 1
# include <nl_types.h>
# endif
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -33,8 +33,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 <xlocale.h>
#elif defined(__Fuchsia__)
# include <__support/fuchsia/xlocale.h>
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -353,7 +353,7 @@
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__)
# define _LIBCPP_USING_ARC4_RANDOM
-#elif defined(__wasi__)
+#elif defined(__wasi__) || defined(__EMSCRIPTEN__)
# define _LIBCPP_USING_GETENTROPY
#elif defined(__Fuchsia__)
# define _LIBCPP_USING_FUCHSIA_CPRNG
@@ -1028,7 +1028,8 @@
defined(__APPLE__) || \
defined(__sun__) || \
defined(__MVS__) || \
- defined(_AIX)
+ defined(_AIX) || \
+ defined(__EMSCRIPTEN__)
# define _LIBCPP_HAS_THREAD_API_PTHREAD
# elif defined(__Fuchsia__)
// TODO(44575): Switch to C11 thread API when possible.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126583.432682.patch
Type: text/x-patch
Size: 2449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220528/9b7c1f13/attachment.bin>
More information about the libcxx-commits
mailing list