summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/__undef_min_max4
-rw-r--r--libcxx/src/stdexcept.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/libcxx/include/__undef_min_max b/libcxx/include/__undef_min_max
index 88bc53feaaf..b1e80d1b049 100644
--- a/libcxx/include/__undef_min_max
+++ b/libcxx/include/__undef_min_max
@@ -9,11 +9,11 @@
//===----------------------------------------------------------------------===//
#ifdef min
-#warning: macro min is incompatible with C++. #undef'ing min
+#warning: macro min is incompatible with C++. #undefing min
#undef min
#endif
#ifdef max
-#warning: macro max is incompatible with C++. #undef'ing max
+#warning: macro max is incompatible with C++. #undefing max
#undef max
#endif
diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp
index 5f4d6b52a4d..660ebfe2735 100644
--- a/libcxx/src/stdexcept.cpp
+++ b/libcxx/src/stdexcept.cpp
@@ -16,8 +16,13 @@
#include <cstddef>
#include "system_error"
-// Use <cxxabi.h> to determine whether we're linking against libc++abi.
-#if __has_include(<cxxabi.h>)
+#ifndef __has_include
+#define __has_include(inc) 0
+#endif
+
+#if __APPLE__
+#include <cxxabi.h>
+#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
#include <cxxabi.h>
#endif
OpenPOWER on IntegriCloud