[Libreoffice-commits] .: tools/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 03:07:40 PST 2012
tools/inc/tools/solar.h | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
New commits:
commit b0505048022efeb5c577232534a1c404d435e8b9
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Nov 27 11:05:36 2012 +0200
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
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 0812f3f..48d57ce 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -152,36 +152,26 @@ template<typename T> 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
More information about the Libreoffice-commits
mailing list