summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Tigeot <ftigeot@wolfpond.org>2011-06-15 00:02:05 +0200
committerFrancois Tigeot <ftigeot@wolfpond.org>2011-06-15 00:03:26 +0200
commitbf8030e44efea64cad418c253c6a5c7cf2ab6410 (patch)
treeecfd571907dbdc97317fb02b62d70c422c1683bb
parenta87eeb9e81eef3425ceb80233d33efd075619061 (diff)
Remove TOOLS_INETDEF_OS
We don't need yet another unmaintainable platform name macro...
-rw-r--r--tools/inc/tools/inetdef.hxx39
-rw-r--r--unotools/source/config/docinfohelper.cxx11
2 files changed, 8 insertions, 42 deletions
diff --git a/tools/inc/tools/inetdef.hxx b/tools/inc/tools/inetdef.hxx
index 9a0c6e3ca08c..137cb2f66f47 100644
--- a/tools/inc/tools/inetdef.hxx
+++ b/tools/inc/tools/inetdef.hxx
@@ -30,45 +30,6 @@
#define _TOOLS_INETDEF_HXX
//============================================================================
-#if defined WNT
-#define TOOLS_INETDEF_OS "Win32"
-#elif defined UNX
-#if defined AIX
-#define TOOLS_INETDEF_OS "AIX"
-#elif defined SOLARIS && defined SPARC
-#define TOOLS_INETDEF_OS "Solaris Sparc"
-#elif defined SOLARIS && defined INTEL
-#define TOOLS_INETDEF_OS "Solaris x86"
-#elif defined NETBSD && defined X86
-#define TOOLS_INETDEF_OS "NetBSD/i386"
-#elif defined NETBSD && defined X86_64
-#define TOOLS_INETDEF_OS "NetBSD/amd64"
-#elif defined NETBSD && defined ARM32
-#define TOOLS_INETDEF_OS "NetBSD/arm"
-#elif defined NETBSD && defined SPARC
-#define TOOLS_INETDEF_OS "NetBSD/sparc"
-#elif defined LINUX && defined X86
-#define TOOLS_INETDEF_OS "Linux"
-#elif defined FREEBSD && defined X86
-#define TOOLS_INETDEF_OS "FreeBSD/i386"
-#elif defined FREEBSD && defined X86_64
-#define TOOLS_INETDEF_OS "FreeBSD/amd64"
-#elif defined OPENBSD && defined X86
-#define TOOLS_INETDEF_OS "OpenBSD/i386"
-#elif defined OPENBSD && defined X86_64
-#define TOOLS_INETDEF_OS "OpenBSD/amd64"
-#elif defined DRAGONFLY && defined X86
-#define TOOLS_INETDEF_OS "DragonFly/i386"
-#elif defined DRAGONFLY && defined X86_64
-#define TOOLS_INETDEF_OS "DragonFly/amd64"
-#else // AIX, SOLARIS, ...
-#define TOOLS_INETDEF_OS "Unix"
-#endif // AIX, SOLARIS, ...
-#else // WNT, ...
-#define TOOLS_INETDEF_OS "unknown OS"
-#endif // WN, ...
-
-//============================================================================
// The following definitions seem obsolete and might get removed in future.
#if defined __RSC
diff --git a/unotools/source/config/docinfohelper.cxx b/unotools/source/config/docinfohelper.cxx
index beb381c51d37..462ab33ca162 100644
--- a/unotools/source/config/docinfohelper.cxx
+++ b/unotools/source/config/docinfohelper.cxx
@@ -34,6 +34,7 @@
#include <unotools/configmgr.hxx>
#include <unotools/bootstrap.hxx>
#include <unotools/docinfohelper.hxx>
+#include <rtl/bootstrap.hxx>
using namespace ::com::sun::star;
@@ -71,10 +72,14 @@ namespace utl
}
}
+ ::rtl::OUString os( RTL_CONSTASCII_USTRINGPARAM("$_OS") );
+ ::rtl::OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
+ ::rtl::Bootstrap::expandMacros(os);
+ ::rtl::Bootstrap::expandMacros(arch);
aResult.append( (sal_Unicode)'$' );
- aResult.append( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- TOOLS_INETDEF_OS )).replace( ' ', '_' ) );
-
+ aResult.append( os );
+ aResult.append( (sal_Unicode)'_' );
+ aResult.append( arch );
aResult.append( (sal_Unicode)' ' );
}