[Libreoffice-commits] .: 3 commits - bridges/source cppu/inc cppu/source i18npool/qa solenv/inc
Tor Lillqvist
tml at kemper.freedesktop.org
Sun Aug 21 07:55:22 PDT 2011
bridges/source/cpp_uno/shared/component.cxx | 8 ++++++++
cppu/inc/uno/environment.h | 6 +++++-
cppu/source/uno/lbenv.cxx | 10 ++++++++++
cppu/source/uno/loadmodule.cxx | 4 ----
i18npool/qa/cppunit/i18npool_cppunittester_all.cxx | 20 ++++++++++++++++++--
solenv/inc/libs.mk | 4 ++++
6 files changed, 45 insertions(+), 7 deletions(-)
New commits:
commit fb9f4d8129eeb12d751a9e5cd47848aa23182ea9
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Aug 21 17:44:30 2011 +0300
Further attempt to make this test run on iOS
diff --git a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx
index 1434dc9..6fcead2 100644
--- a/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx
+++ b/i18npool/qa/cppunit/i18npool_cppunittester_all.cxx
@@ -119,8 +119,24 @@ extern "C" CppUnitTestPlugIn
SAL_IMPLEMENT_MAIN() {
- putenv("UNO_SERVICES=services.rdb");
- putenv("UNO_TYPES=types.rdb udkapi.rdb");
+ rtl::OUString sServices(RTL_CONSTASCII_USTRINGPARAM("UNO_SERVICES"));
+ rtl::OUString sTypes(RTL_CONSTASCII_USTRINGPARAM("UNO_TYPES"));
+
+ rtl::OUString sBrandLocation(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/"));
+
+ rtl::Bootstrap::expandMacros(sBrandLocation);
+
+ rtl::OUString sServicesValue = rtl::OUStringBuffer(sBrandLocation)
+ . append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("services.rdb"))).makeStringAndClear();
+ osl_setEnvironment(sServices.pData, sServicesValue.pData);
+
+ rtl::OUString sTypesValue = rtl::OUStringBuffer(sBrandLocation)
+ .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("types.rdb")))
+ .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")))
+ .append(sBrandLocation)
+ .append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("udkapi.rdb")));
+ osl_setEnvironment(sTypes.pData, sTypesValue.pData);
+
TestPlugInSignature plugs[] = {
cppunitTest_i18npool_breakiterator,
NULL
commit b6a9f3560abae7a2b7bb33f6b30e4413105ff4d7
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Aug 21 17:33:43 2011 +0300
Link cppu statically to gcc3_uno on iOS
diff --git a/cppu/inc/uno/environment.h b/cppu/inc/uno/environment.h
index 81c0b17..5ef4a5d 100644
--- a/cppu/inc/uno/environment.h
+++ b/cppu/inc/uno/environment.h
@@ -375,7 +375,11 @@ void SAL_CALL uno_Environment_enter(uno_Environment * pEnv)
int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pReason)
SAL_THROW_EXTERN_C();
-
+#ifdef IOS
+/* We link statically on iOS and have just one kind of environment */
+void SAL_CALL gcc3_uno_initEnvironment(uno_Environment *pCppEnv)
+ SAL_THROW_EXTERN_C();
+#endif
#ifdef __cplusplus
}
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 651e686..faad544 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -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 );
diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx
index ecc3ad9..fe2b9d0 100644
--- a/cppu/source/uno/loadmodule.cxx
+++ b/cppu/source/uno/loadmodule.cxx
@@ -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
}
} }
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index 2b85df1..dffd6f4 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -323,8 +323,12 @@ REGLIB+=$(STORELIB)
BOOTSTRAPUNOLIB=$(SOLARLIBDIR)/bootstrap.uno.a
BOOTSTRAPUNOLIB+=$(SALHELPERLIB) $(REGLIB) $(XMLREADERLIB)
+GCC3UNOLIB=-lgcc3_uno
+
SALLIB+=-lsal_textenc
+CPPULIB+=$(GCC3UNOLIB)
+
CPPUHELPERLIB+=$(BOOTSTRAPUNOLIB)
UCBHELPERLIB+=$(SALHELPERLIB)
commit c209bef8e51e89d325d32104e28ddeb624675241
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Aug 21 17:31:41 2011 +0300
Use prefixed name for uno_initEnvironment() for iOS
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index f4f0a19..e093705 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -197,11 +197,19 @@ static void SAL_CALL environmentDisposing( uno_Environment * ) SAL_THROW( () )
&bridges::cpp_uno::shared::g_moduleCount.modCnt );
}
+#ifndef IOS
+
sal_Bool SAL_CALL component_canUnload(TimeValue * pTime) SAL_THROW_EXTERN_C() {
return bridges::cpp_uno::shared::g_moduleCount.canUnload(
&bridges::cpp_uno::shared::g_moduleCount, pTime);
}
+#endif
+
+#ifdef IOS
+#define uno_initEnvironment gcc3_uno_initEnvironment
+#endif
+
void SAL_CALL uno_initEnvironment(uno_Environment * pCppEnv)
SAL_THROW_EXTERN_C()
{
More information about the Libreoffice-commits
mailing list