Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: include/__config

Issue 1441603003: Cherry-pick upstream r252457 (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-libcxx.git@master
Patch Set: Use __musl__ define to detect musl Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/__locale » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/__config
diff --git a/include/__config b/include/__config
index 6f57df5d233f7c3ae673727eb92ccb14443278ef..15af1598d23a446dea297f6eee37ef6861b6fbf1 100644
--- a/include/__config
+++ b/include/__config
@@ -118,6 +118,10 @@
# define _LIBCPP_USING_NACL_RANDOM
#endif // defined(__native_client__)
+#ifdef __musl__
+#define _LIBCPP_HAS_MUSL_LIBC
+#endif // defined(__musl__)
+
#if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN)
# include <endian.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -332,14 +336,19 @@ typedef __char32_t char32_t;
#elif defined(__ANDROID__)
#define _LIBCPP_HAS_QUICK_EXIT
#elif defined(__linux__)
-#include <features.h>
+#if !defined(_LIBCPP_HAS_MUSL_LIBC)
+# include <features.h>
#if __GLIBC_PREREQ(2, 15)
#define _LIBCPP_HAS_QUICK_EXIT
#endif
#if __GLIBC_PREREQ(2, 17)
#define _LIBCPP_HAS_C11_FEATURES
#endif
+#else // defined(_LIBCPP_HAS_MUSL_LIBC)
+#define _LIBCPP_HAS_QUICK_EXIT
+#define _LIBCPP_HAS_C11_FEATURES
#endif
+#endif // __linux__
#endif
#if (__has_feature(cxx_noexcept))
« no previous file with comments | « no previous file | include/__locale » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698