From b0505048022efeb5c577232534a1c404d435e8b9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 27 Nov 2012 11:05:36 +0200 Subject: Simplify SVLIBRARY No need for a __DLLEXTENSION macro that is used nowhere else, and which is in the namespace reserved for the compiler implementation (two initial underscores) even. Just one #ifdef tree is enough. Change-Id: Ib2612ceba385250792c52066a720b220eb294aea --- tools/inc/tools/solar.h | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'tools') diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 0812f3faf630..48d57ce7f6f6 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -152,36 +152,26 @@ template inline T Abs(T a) { return (a>=0?a:-a); } #pragma warning(error : 4002 4003) #endif -// dll file extensions - -#if defined WNT - #define __DLLEXTENSION "lo" -#elif defined MACOSX - #define __DLLEXTENSION "lo.dylib" -#elif defined UNX - #define __DLLEXTENSION "lo.so" -#else - #error unknown platform -#endif - #define UniString String #define XubString String #define xub_StrLen sal_uInt16 -#define LIBRARY_CONCAT3( s1, s2, s3 ) \ +#define STRING_CONCAT3( s1, s2, s3 ) \ s1 s2 s3 -#define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \ - s1 s2 s3 s4 + +// dll file extensions #if defined WNT #define SVLIBRARY( Base ) \ - LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" ) + STRING_CONCAT3( Base, "lo", ".dll" ) +#elif defined MACOSX +#define SVLIBRARY( Base ) \ + STRING_CONCAT3( "lib", Base, "lo.dylib" ) #elif defined UNX #define SVLIBRARY( Base ) \ - LIBRARY_CONCAT3( "lib", Base, __DLLEXTENSION ) + STRING_CONCAT3( "lib", Base, "lo.so" ) #else -#define SVLIBRARY( Base ) \ - LIBRARY_CONCAT2( Base, __DLLEXTENSION ) + #error unknown platform #endif #endif -- cgit