summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-11-01 21:17:56 +0000
committerDan Albert <danalbert@google.com>2017-11-01 21:17:56 +0000
commit5a4e27dfa6f346a8d1e5c4e834b4877a37c57b58 (patch)
treec5edb594c48109488e0dc6a0c723d6489d97cd71
parent0ad18f888ed464b28e947dbc92ea4d6764caf128 (diff)
downloadbcm5719-llvm-5a4e27dfa6f346a8d1e5c4e834b4877a37c57b58.tar.gz
bcm5719-llvm-5a4e27dfa6f346a8d1e5c4e834b4877a37c57b58.zip
[libc++] Don't alias quick_exit if __ANDROID_API__ < 21
Summary: quick_exit() and at_quick_exit() were introduced in android NDK 21: https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/stdlib.h#55 This CL conditions `_LIBCPP_HAS_QUICK_EXIT` on `__ANDROID_API__ >= 21`. The only place this macro is used is in some using declarations: `using ::quick_exit`, `using ::at_quick_exit`. Also, add a missing include to sys/cdefs.h which is what defines `__BIONIC__`. Reviewers: thakis, danalbert, EricWF Reviewed By: danalbert Subscribers: srhines, krytarowski Differential Revision: https://reviews.llvm.org/D39479 llvm-svn: 317124
-rw-r--r--libcxx/include/__config6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index d6217234a8b..33cb9c435bc 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -296,6 +296,10 @@
#define _LIBCPP_NO_CFI
#endif
+#if __libcpp_has_include(<sys/cdefs.h>)
+#include <sys/cdefs.h>
+#endif
+
#if defined(_LIBCPP_COMPILER_CLANG)
// _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
@@ -407,7 +411,7 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_C11_FEATURES
#elif defined(__linux__)
#if !defined(_LIBCPP_HAS_MUSL_LIBC)
-#if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
+#if __GLIBC_PREREQ(2, 15) || (defined(__BIONIC__) && (__ANDROID_API__ >= 21))
#define _LIBCPP_HAS_QUICK_EXIT
#endif
#if __GLIBC_PREREQ(2, 17)
OpenPOWER on IntegriCloud