diff options
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx index 1b2c4b000de5..fe4c19a3ca13 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <string.h> #include <dlfcn.h> #include <cxxabi.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> @@ -102,7 +103,7 @@ static OUString toUNOname( char const * p ) SAL_THROW( () ) //================================================================================================== class RTTI { - typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map; + typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map; Mutex m_mutex; t_rtti_map m_rttis; @@ -118,7 +119,11 @@ public: }; //__________________________________________________________________________________________________ RTTI::RTTI() SAL_THROW( () ) +#if defined(FREEBSD) && __FreeBSD_version < 702104 + : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) +#else : m_hApp( dlopen( 0, RTLD_LAZY ) ) +#endif { } //__________________________________________________________________________________________________ @@ -153,7 +158,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR buf.append( 'E' ); OString symName( buf.makeStringAndClear() ); +#if defined(FREEBSD) && __FreeBSD_version < 702104 /* #i22253# */ + rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); +#else rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); +#endif if (rtti) { @@ -229,7 +238,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) OUStringToOString( *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), RTL_TEXTENCODING_ASCII_US ) ); - fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() ); + fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() ); #endif void * pCppExc; type_info * rtti; @@ -303,7 +312,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping OUString unoName( toUNOname( header->exceptionType->name() ) ); #if OSL_DEBUG_LEVEL > 1 OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); - fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() ); + fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() ); #endif typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); if (0 == pExcTypeDescr) @@ -328,3 +337,4 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |