Index: bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx =================================================================== RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx,v retrieving revision 1.3 diff -u -r1.3 cpp2uno.cxx --- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 28 Apr 2003 16:28:20 -0000 1.3 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 8 Jan 2007 00:45:53 -0000 @@ -59,9 +59,9 @@ * ************************************************************************/ +#include #include -#include #include #include Index: bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx =================================================================== RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx,v retrieving revision 1.4 diff -u -r1.4 except.cxx --- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 28 Apr 2003 16:41:25 -0000 1.4 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 8 Jan 2007 00:45:53 -0000 @@ -63,6 +63,7 @@ #include #include #include +#include #include #include @@ -147,7 +148,11 @@ }; //__________________________________________________________________________________________________ RTTI::RTTI() SAL_THROW( () ) +#if __FreeBSD_version < 602103 /* #i22253# */ + : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) +#else : m_hApp( dlopen( 0, RTLD_LAZY ) ) +#endif { } //__________________________________________________________________________________________________ @@ -182,7 +187,11 @@ buf.append( 'E' ); OString symName( buf.makeStringAndClear() ); +#if __FreeBSD_version < 602103 /* #i22253# */ + rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); +#else rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); +#endif if (rtti) { @@ -253,7 +262,7 @@ //================================================================================================== void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) { -#if defined DEBUG +#if OSL_DEBUG_LEVEL > 1 OString cstr( OUStringToOString( *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), @@ -275,7 +284,7 @@ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), Reference< XInterface >() ); } - + pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); @@ -321,16 +330,16 @@ Reference< XInterface >() ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); -#if defined _DEBUG +#if OSL_DEBUG_LEVEL > 0 OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_ENSURE( 0, cstr.getStr() ); #endif return; } - + typelib_TypeDescription * pExcTypeDescr = 0; OUString unoName( toUNOname( header->exceptionType->name() ) ); -#if defined DEBUG +#if OSL_DEBUG_LEVEL > 1 OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() ); #endif @@ -342,7 +351,7 @@ Reference< XInterface >() ); Type const & rType = ::getCppuType( &aRE ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); -#if defined _DEBUG +#if OSL_DEBUG_LEVEL > 0 OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_ENSURE( 0, cstr.getStr() ); #endif Index: bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx =================================================================== RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx,v retrieving revision 1.4 diff -u -r1.4 uno2cpp.cxx --- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx 28 Apr 2003 16:28:35 -0000 1.4 +++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx 8 Jan 2007 00:45:53 -0000 @@ -59,7 +59,7 @@ * ************************************************************************/ -#include +#include #include #include