From 3add966877646d0c6f43e0ec37587f52d2a757d9 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 28 Aug 2015 22:31:26 +0300 Subject: [PATCH] Added support for gabi++ ABI implementation used in Android NDK. --- include/boost/core/demangle.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/boost/core/demangle.hpp b/include/boost/core/demangle.hpp index eebd0ce..44aeb8d 100644 --- a/include/boost/core/demangle.hpp +++ b/include/boost/core/demangle.hpp @@ -27,8 +27,15 @@ #if defined( BOOST_CORE_HAS_CXXABI_H ) # include -# include -# include +// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library +// (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement +// abi::__cxa_demangle(). We detect this implementation by checking the include guard here. +# if defined( __GABIXX_CXXABI_H__ ) +# undef BOOST_CORE_HAS_CXXABI_H +# else +# include +# include +# endif #endif namespace boost