File tree 4 files changed +8
-25
lines changed
4 files changed +8
-25
lines changed Original file line number Diff line number Diff line change 12
12
#include " exception"
13
13
#include " new"
14
14
15
- #ifndef __has_include
16
- #define __has_include (inc ) 0
17
- #endif
18
-
19
15
#if defined(__APPLE__) && !defined(LIBCXXRT)
20
16
#include < cxxabi.h>
21
17
29
25
#define __terminate_handler __cxxabiapple::__cxa_terminate_handler
30
26
#define __unexpected_handler __cxxabiapple::__cxa_unexpected_handler
31
27
#endif // _LIBCPPABI_VERSION
32
- #elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || __has_include(<cxxabi.h>)
28
+ #elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
33
29
#include < cxxabi.h>
34
30
using namespace __cxxabiv1 ;
35
31
#if defined(LIBCXXRT) || defined(_LIBCPPABI_VERSION)
36
32
#define HAVE_DEPENDENT_EH_ABI 1
37
33
#endif
38
- #elif !defined(__GLIBCXX__) // __has_include(<cxxabi.h> )
34
+ #elif !defined(__GLIBCXX__) // defined(LIBCXX_BUILDING_LIBCXXABI )
39
35
static std::terminate_handler __terminate_handler;
40
36
static std::unexpected_handler __unexpected_handler;
41
- #endif // __has_include(<cxxabi.h> )
37
+ #endif // defined(LIBCXX_BUILDING_LIBCXXABI )
42
38
43
39
namespace std
44
40
{
Original file line number Diff line number Diff line change 13
13
14
14
#include " new"
15
15
16
- #ifndef __has_include
17
- #define __has_include (inc ) 0
18
- #endif
19
-
20
16
#if defined(__APPLE__) && !defined(LIBCXXRT)
21
17
#include < cxxabi.h>
22
18
27
23
#define __new_handler __cxxabiapple::__cxa_new_handler
28
24
#endif
29
25
#else // __APPLE__
30
- #if defined(LIBCXXRT) || __has_include(<cxxabi.h> )
26
+ #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI )
31
27
#include < cxxabi.h>
32
- #endif // __has_include(<cxxabi.h> )
28
+ #endif // defined(LIBCXX_BUILDING_LIBCXXABI )
33
29
#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
34
30
static std::new_handler __new_handler;
35
31
#endif // _LIBCPPABI_VERSION
Original file line number Diff line number Diff line change 13
13
#include " string"
14
14
#include " system_error"
15
15
16
- #ifndef __has_include
17
- #define __has_include (inc ) 0
18
- #endif
19
-
20
16
/* For _LIBCPPABI_VERSION */
21
- #if __has_include(<cxxabi.h> ) || defined(__APPLE_) || defined(LIBCXXRT)
17
+ #if defined(LIBCXX_BUILDING_LIBCXXABI ) || defined(__APPLE_) || defined(LIBCXXRT)
22
18
#include < cxxabi.h>
23
19
#endif
24
20
Original file line number Diff line number Diff line change 8
8
// ===----------------------------------------------------------------------===//
9
9
#include < stdlib.h>
10
10
11
- #ifndef __has_include
12
- #define __has_include (inc ) 0
13
- #endif
14
-
15
- #ifdef __APPLE__
16
- #include < cxxabi.h>
17
- #elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
11
+ #if defined(__APPLE__) || defined(LIBCXXRT) || \
12
+ defined (LIBCXX_BUILDING_LIBCXXABI)
18
13
#include < cxxabi.h>
19
14
#endif
20
15
You can’t perform that action at this time.
0 commit comments