Re: [CODE] tools/solar.h DLLPOSTFIX clean-up
On 21.10.2011 16:36, Ariel Constenla-Haile wrote: loading libraries is broken in code that uses the macro SVLIBRARY [...] attached patch removes all DLLPOSTFIXes Good catch! Thanks for the patch. Applied as http://svn.apache.org/viewvc?rev=1188107view=rev This shows that there was way to much duplication of such stuff. I wonder if the many lines could have been merged into something like #define __DLLEXTENSION DLLPOSTFIX##DLLPOST Herbert
Re: [CODE] tools/solar.h DLLPOSTFIX clean-up
Hi Herbert, On Mon, Oct 24, 2011 at 02:25:13PM +0200, Herbert Duerr wrote: On 21.10.2011 16:36, Ariel Constenla-Haile wrote: loading libraries is broken in code that uses the macro SVLIBRARY [...] attached patch removes all DLLPOSTFIXes Good catch! Thanks for the patch. Applied as http://svn.apache.org/viewvc?rev=1188107view=rev This shows that there was way to much duplication of such stuff. I wonder if the many lines could have been merged into something like #define __DLLEXTENSION DLLPOSTFIX##DLLPOST one should also fix the other macros: #if defined WNT || defined OS2 #define SVLIBRARY( Base ) \ LIBRARY_CONCAT3( Base, __DLLEXTENSION, .DLL ) will end up in cui.dll.DLL for example the same for #define SV_LIBFILENAME(str) \ LIBRARYFILENAME_CONCAT3( str, __DLLEXTENSION, .dll ) and, AFAIK * in the old build env. DLLPOSTFIX and DLLPOST are just variables, not passed to the compiler as macro definitions, so it seems one should add them in solenv/inc/settings.mk CDEFS+=-DDLLPOSTFIX=$(DLLPOSTFIX) CDEFS+=-DDLLPOST=$(DLLPOST) * gbuild knows nothing about DLLPOSTFIX and DLLPOST, this should be fixed as well This all looks a little messy. Regards -- Ariel Constenla-Haile La Plata, Argentina pgp8Jxgpl0pF0.pgp Description: PGP signature
[CODE] tools/solar.h DLLPOSTFIX clean-up
Hi there, loading libraries is broken in code that uses the macro SVLIBRARY defined in tools/inc/tools/solar.h, the __DLLEXTENSION macro defined in that file uses the dll postfixes that where recently removed. http://svn.apache.org/viewvc/incubator/ooo/trunk/main/tools/inc/tools/solar.h?view=markup#l342 http://svn.apache.org/viewvc/incubator/ooo/trunk/main/tools/inc/tools/solar.h?view=markup#l243 An example in GetSpecialCharsForEdit from sfx2/source/appl/appinit.cxx http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/appl/appinit.cxx?view=markup#l205 * open a Writer document * open the Find Replace dialog * right click on an edit field * select Special Character from the context menu * the cui library cannot be loaded attached patch removes all DLLPOSTFIXes, except the one from WIN when compiled with mingw, this postfix wasn't removed in http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/inc/wntgcci.mk?view=markup#l185 Regards -- Ariel Constenla-Haile La Plata, Argentina diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 0449bc8..50916a7 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -246,67 +246,22 @@ templatetypename T inline T Abs(T a) { return (a=0?a:-a); } #if defined(__MINGW32__) #define __DLLEXTENSIONgi #else - #define __DLLEXTENSION mi + #define __DLLEXTENSION #endif #elif defined OS2 - #define __DLLEXTENSION go + #define __DLLEXTENSION #elif defined UNX -#ifdef AIX - #define __DLLEXTENSION ap.so -#elif defined HPUX - #define __DLLEXTENSION hr.sl -#elif defined SOLARIS defined SPARC defined IS_LP64 - #define __DLLEXTENSION su.so -#elif defined SOLARIS defined SPARC !defined __GNUC__ - #define __DLLEXTENSION ss.so -#elif defined SOLARIS defined SPARC defined __GNUC__ - #define __DLLEXTENSION sogs.so -#elif defined SOLARIS defined INTEL !defined __GNUC__ - #define __DLLEXTENSION si.so -#elif defined SOLARIS defined INTEL defined __GNUC__ - #define __DLLEXTENSION sogi.so -#elif defined SCO - #define __DLLEXTENSION ci.so -#elif defined NETBSD defined X86 - #define __DLLEXTENSION bi.so -#elif defined NETBSD defined ARM32 - #define __DLLEXTENSION ba.so -#elif defined NETBSD defined SPARC - #define __DLLEXTENSION bs.so -#elif defined NETBSD defined POWERPC - #define __DLLEXTENSION bp.so -#elif defined LINUX defined X86 - #define __DLLEXTENSION li.so -#elif defined LINUX defined POWERPC - #define __DLLEXTENSION lp.so -#elif defined LINUX defined S390 - #define __DLLEXTENSION l3.so -#elif defined LINUX defined ARM32 - #define __DLLEXTENSION lr.so -#elif defined LINUX defined SPARC - #define __DLLEXTENSION ls.so -#elif defined LINUX defined __x86_64__ - #define __DLLEXTENSION lx.so -#elif defined LINUX defined MIPS - #define __DLLEXTENSION lm.so -#elif defined LINUX defined IA64 - #define __DLLEXTENSION la.so -#elif defined LINUX defined M68K - #define __DLLEXTENSION lm.so -#elif defined LINUX defined HPPA - #define __DLLEXTENSION lh.so -#elif defined LINUX defined AXP - #define __DLLEXTENSION ll.so -#elif defined LINUX - #error unknown plattform -#elif defined FREEBSD defined X86 - #define __DLLEXTENSION fi.so -#elif defined FREEBSD defined X86_64 - #define __DLLEXTENSION fx.so -#elif defined MACOSX defined POWERPC - #define __DLLEXTENSION mxp.dylib -#elif defined MACOSX defined X86 - #define __DLLEXTENSION mxi.dylib +#ifdef HPUX + #define __DLLEXTENSION .sl +#elif defined AIX || \ + defined SOLARIS || \ + defined SCO || \ + defined NETBSD || \ + defined LINUX || \ + defined FREEBSD + #define __DLLEXTENSION .so +#elif defined MACOSX + #define __DLLEXTENSION .dylib #else #define __DLLEXTENSION .so #endif pgpZ8KSa3X6tg.pgp Description: PGP signature