--- bridges/source/cpp_uno/gcc3_linux_intel/share.hxx.orig 2014-09-16 16:10:41.000000000 -0400 +++ bridges/source/cpp_uno/gcc3_linux_intel/share.hxx 2014-10-10 18:08:14.000000000 -0400 @@ -32,10 +32,34 @@ #include #include "uno/mapping.h" -namespace CPPU_CURRENT_NAMESPACE +#ifdef _LIBCPP_VERSION + +namespace __cxxabiv1 { + struct __class_type_info : public std::type_info + { + explicit __class_type_info( const char *__n ) : type_info( __n ) { } + virtual ~__class_type_info(); + }; + + struct __si_class_type_info : public __class_type_info + { + explicit __si_class_type_info( const char *__n, const __class_type_info *__b ) : + __class_type_info( __n ), __base_type( __b ) { } + virtual ~__si_class_type_info(); + const __class_type_info *__base_type; + }; -void dummy_can_throw_anything( char const * ); +extern "C" void *__cxa_allocate_exception( std::size_t thrown_size ) _NOEXCEPT; + +extern "C" _LIBCPP_NORETURN void __cxa_throw( + void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ); +} + +#else + +namespace CPPU_CURRENT_NAMESPACE +{ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h @@ -104,16 +128,23 @@ __attribute__((noreturn)); } #endif +} +#endif namespace CPPU_CURRENT_NAMESPACE { +void dummy_can_throw_anything( char const * ); + void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); void fillUnoException( +#ifdef _LIBCPP_VERSION + __cxxabiv1::__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); +#else __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); - +#endif } namespace x86 --- bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx.orig 2014-09-16 16:10:41.000000000 -0400 +++ bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx 2014-10-10 17:59:01.000000000 -0400 @@ -203,10 +203,17 @@ catch (...) { // fill uno exception +#ifdef _LIBCPP_VERSION + CPPU_CURRENT_NAMESPACE::fillUnoException( + reinterpret_cast< __cxxabiv1::__cxa_eh_globals * >( + __cxxabiv1::__cxa_get_globals())->caughtExceptions, + *ppUnoExc, pThis->getBridge()->getCpp2Uno()); +#else fillUnoException( reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >( __cxxabiv1::__cxa_get_globals())->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno()); +#endif // temporary params for ( ; nTempIndices--; )