From 2dca38540ec89dfeceae130db5cf40b3505f1d97 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 3 Aug 2011 01:08:48 +0300 Subject: Don't use dynamic loading on iOS --- sal/textenc/tables.cxx | 10 ++++------ sal/textenc/textenc.cxx | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'sal/textenc') diff --git a/sal/textenc/tables.cxx b/sal/textenc/tables.cxx index 00d78110106b..8197f6810c49 100644 --- a/sal/textenc/tables.cxx +++ b/sal/textenc/tables.cxx @@ -26,6 +26,10 @@ * ************************************************************************/ +#ifdef IOS +#define Impl_getTextEncodingData tables_Impl_getTextEncodingData +#endif + #ifndef INCLUDED_RTL_TEXTENC_GETTEXTENCODINGDATA_H #include "gettextencodingdata.h" #endif @@ -127,12 +131,6 @@ static sal_uInt16 const aImplDoubleByteIdentifierTab[1] = { 0 }; ImplTextEncodingData const * Impl_getTextEncodingData(rtl_TextEncoding nEncoding) -#ifdef IOS - // Dunno if the g++ for iOS is just pickier, or why other g++ - // versions don't complain about the lack of throw to match the - // one in the declaration in gettextencodingdata.h.o - SAL_THROW_EXTERN_C() -#endif { static ImplTextEncodingData const * const aData[] = { NULL, /* DONTKNOW */ diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx index 66ca45ca601b..0b245a078e82 100644 --- a/sal/textenc/textenc.cxx +++ b/sal/textenc/textenc.cxx @@ -100,7 +100,12 @@ extern "C" { // Yes - we should use the unpleasant to use templatized // sal:: doublecheckfoo thing here. +#ifndef IOS static TextEncodingFunction pTables; +#else +extern "C" ImplTextEncodingData *tables_Impl_getTextEncodingData(rtl_TextEncoding); +#define pTables tables_Impl_getTextEncodingData +#endif #define DOSTRING( x ) #x #define STRING( x ) DOSTRING( x ) @@ -137,6 +142,7 @@ Impl_getTextEncodingData(rtl_TextEncoding nEncoding) SAL_THROW_EXTERN_C() // ---------------------------------------------- #endif default: +#ifndef IOS if (!pTables) { static char const pName[] = STRING(PLUGIN_NAME); @@ -148,6 +154,7 @@ Impl_getTextEncodingData(rtl_TextEncoding nEncoding) SAL_THROW_EXTERN_C() pTables = (TextEncodingFunction)osl_getAsciiFunctionSymbol(aModule, pSymbol); } } +#endif if (pTables) return pTables(nEncoding); // else -- cgit