From bbbf484a24de955e07a4ff329247295b6866e3b2 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 6 Aug 2013 01:30:31 +0900 Subject: [PATCH] fix testspr/typeinfo.hpp: workaround --- testspr/typeinfo.hpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/testspr/typeinfo.hpp b/testspr/typeinfo.hpp index 33996f8a..53dc29d1 100644 --- a/testspr/typeinfo.hpp +++ b/testspr/typeinfo.hpp @@ -1,12 +1,21 @@ #ifndef TESTSPR_TYPEINFO_HPP #define TESTSPR_TYPEINFO_HPP -#if defined(__GNUC__) -# include +// +// TESTSPR_HAS_CXXABI_H +// +#if defined(__clang__) +# if defined(__has_include) && __has_include() +# define TESTSPR_HAS_CXXABI_H +# endif +#elif defined(__GNUC__) && !defined(__QNX__) +# define TESTSPR_HAS_CXXABI_H #endif + #include #include -#if defined(__GNUC__) +#ifdef TESTSPR_HAS_CXXABI_H +# include # include #endif @@ -23,7 +32,7 @@ namespace testspr { // // typename_of // -#if defined(__GNUC__) +#ifdef TESTSPR_HAS_CXXABI_H namespace detail { std::string gcc_demangle(char const* mangled) { int status;