Link cppu statically to gcc3_uno on iOS

This commit is contained in:
Tor Lillqvist
2011-08-21 17:33:43 +03:00
parent c209bef8e5
commit b6a9f3560a
4 changed files with 19 additions and 5 deletions

View File

@@ -1064,6 +1064,14 @@ static bool loadEnv(OUString const & cLibStem,
uno_Environment * pEnv,
void * /*pContext*/)
{
#ifdef IOS
oslModule hMod;
uno_initEnvironmentFunc fpInit = NULL;
if (cLibStem.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("gcc3_uno")) )
fpInit = gcc3_uno_initEnvironment;
osl_getModuleHandle( NULL, &hMod );
#else
// late init with some code from matching uno language binding
// will be unloaded by environment
oslModule hMod = cppu::detail::loadModule( cLibStem );
@@ -1074,6 +1082,8 @@ static bool loadEnv(OUString const & cLibStem,
OUString aSymbolName(RTL_CONSTASCII_USTRINGPARAM(UNO_INIT_ENVIRONMENT));
uno_initEnvironmentFunc fpInit = (uno_initEnvironmentFunc)
::osl_getFunctionSymbol( hMod, aSymbolName.pData );
#endif
if (!fpInit)
{
::osl_unloadModule( hMod );

View File

@@ -41,9 +41,6 @@
namespace cppu { namespace detail {
::oslModule loadModule(rtl::OUString const & name) {
#ifdef IOS
return NULL;
#else
rtl::OUStringBuffer b;
#if defined SAL_DLLPREFIX
b.appendAscii(RTL_CONSTASCII_STRINGPARAM(SAL_DLLPREFIX));
@@ -54,7 +51,6 @@ namespace cppu { namespace detail {
reinterpret_cast< oslGenericFunction >(&loadModule),
b.makeStringAndClear().pData,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY);
#endif
}
} }