Kaydet (Commit) 7cc551e6 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS freebsd08 (1.7.52); FILE MERGED

2007/06/01 21:40:54 maho 1.7.52.1: * Sync with newer bridge code from Linux.
* Now : m_hApp( dlopen( 0, RTLD_LAZY ) ) etc works correctly
on _FreeBSD_version >= 602103

Issue number:  #i66667#
Submitted by:  jkim
üst 32caf6de
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: except.cxx,v $ * $RCSfile: except.cxx,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: obo $ $Date: 2006-09-16 15:45:54 $ * last change: $Author: rt $ $Date: 2007-07-05 09:00:28 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <dlfcn.h> #include <dlfcn.h>
#include <cxxabi.h> #include <cxxabi.h>
#include <hash_map> #include <hash_map>
#include <sys/param.h>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
...@@ -125,7 +126,11 @@ public: ...@@ -125,7 +126,11 @@ public:
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () ) RTTI::RTTI() SAL_THROW( () )
#if __FreeBSD_version < 602103
: m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) ) : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
#else
: m_hApp( dlopen( 0, RTLD_LAZY ) )
#endif
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
...@@ -142,8 +147,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -142,8 +147,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
MutexGuard guard( m_mutex ); MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
if (iFind == m_rttis.end()) if (iRttiFind == m_rttis.end())
{ {
// RTTI symbol // RTTI symbol
OStringBuffer buf( 64 ); OStringBuffer buf( 64 );
...@@ -160,8 +165,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -160,8 +165,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' ); buf.append( 'E' );
OString symName( buf.makeStringAndClear() ); OString symName( buf.makeStringAndClear() );
//#iZ 22253 #if __FreeBSD_version < 602103 /* #i22253# */
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
#else
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
#endif
if (rtti) if (rtti)
{ {
...@@ -208,7 +216,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -208,7 +216,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
} }
else else
{ {
rtti = iFind->second; rtti = iRttiFind->second;
} }
return rtti; return rtti;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment