diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-08 19:39:03 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-08 19:39:03 +0000 | 
| commit | aed8d94e97d1be8b4e26ce1ffb4d0547aee8ab1d (patch) | |
| tree | f4b32ab9e34cda2eead99ae084f0b02d0dab6891 /contrib/libc++/src/exception.cpp | |
| parent | 657db61c2068b2bcc0d930546402284e2c9c9abd (diff) | |
| parent | 4a2db4d30e1653093d4d8b06e8221e2f8b723507 (diff) | |
Notes
Diffstat (limited to 'contrib/libc++/src/exception.cpp')
| -rw-r--r-- | contrib/libc++/src/exception.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/contrib/libc++/src/exception.cpp b/contrib/libc++/src/exception.cpp index e172f642d483..ec8969aaf4c0 100644 --- a/contrib/libc++/src/exception.cpp +++ b/contrib/libc++/src/exception.cpp @@ -12,7 +12,8 @@  #include "exception"  #include "new" -#if defined(__APPLE__) && !defined(LIBCXXRT) +#if defined(__APPLE__) && !defined(LIBCXXRT) && \ +    !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)    #include <cxxabi.h>    using namespace __cxxabiv1; @@ -32,8 +33,8 @@      #define HAVE_DEPENDENT_EH_ABI 1    #endif  #elif !defined(__GLIBCXX__) // defined(LIBCXX_BUILDING_LIBCXXABI) -  static std::terminate_handler  __terminate_handler; -  static std::unexpected_handler __unexpected_handler; +  _LIBCPP_SAFE_STATIC static std::terminate_handler  __terminate_handler; +  _LIBCPP_SAFE_STATIC static std::unexpected_handler __unexpected_handler;  #endif // defined(LIBCXX_BUILDING_LIBCXXABI)  namespace std @@ -106,7 +107,8 @@ bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }  int uncaught_exceptions() _NOEXCEPT  { -#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION) +#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \ +    (defined(__APPLE__) || defined(_LIBCPPABI_VERSION))     // on Darwin, there is a helper function so __cxa_get_globals is private  # if _LIBCPPABI_VERSION > 1101      return __cxa_uncaught_exceptions(); | 
