diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-04-15 11:54:24 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-04-15 11:56:56 +0200 |
commit | 7021bfe89b4b02e2e683c23763faa9e4a10e3f2e (patch) | |
tree | e06f0090d2701b0112c1b7607e5f1c54edde0e28 /stoc/source | |
parent | 906aa9dea2982efa6497880fb8158537d2e96646 (diff) |
Modify for static linking (DISABLE_DYNLOADING, i.e. iOS)
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/stocservices/stocservices.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx index 89d034ad143c..b5be16f84f3e 100644 --- a/stoc/source/stocservices/stocservices.cxx +++ b/stoc/source/stocservices/stocservices.cxx @@ -41,6 +41,17 @@ using namespace cppu; using namespace osl; using namespace stoc_services; +#ifdef DISABLE_DYNLOADING + +// Do we really to have non-static global variable with the same name +// g_moduleCount in *all* (more or less, it seems) modules even in the +// normal dynamic loading case? Weird. Anyway, in the DISABLE_DYNLOADING +// case we have no use for these, and they can't be the same name. + +#define g_moduleCount g_stocservices_moduleCount + +#endif + rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; static struct ImplementationEntry g_entries[] = @@ -88,12 +99,19 @@ static struct ImplementationEntry g_entries[] = extern "C" { +#ifndef DISABLE_DYNLOADING + SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) { return g_moduleCount.canUnload( &g_moduleCount , pTime ); } -//================================================================================================== +#endif + +#ifdef DISABLE_DYNLOADING +#define component_getFactory stocservices_component_getFactory +#endif + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { |