diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-16 14:14:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-17 11:33:57 +0000 |
commit | 2087484c65a3d5e75a9e8ad116d11a4e13366219 (patch) | |
tree | 1f335918a854319df9269329d165a91d711d2108 /tools | |
parent | d6bf086012343b4a1e27cd4242dced9ee0d73a06 (diff) |
use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
In this stage we focus on replacing usage of the WIN macro
Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qa/cppunit/test_pathutils.cxx | 2 | ||||
-rw-r--r-- | tools/source/datetime/tdate.cxx | 4 | ||||
-rw-r--r-- | tools/source/datetime/ttime.cxx | 8 | ||||
-rw-r--r-- | tools/source/generic/config.cxx | 4 | ||||
-rw-r--r-- | tools/source/inet/inetmime.cxx | 8 | ||||
-rw-r--r-- | tools/source/misc/pathutils.cxx | 2 | ||||
-rw-r--r-- | tools/source/stream/strmsys.cxx | 2 | ||||
-rw-r--r-- | tools/source/stream/strmwnt.cxx | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/tools/qa/cppunit/test_pathutils.cxx b/tools/qa/cppunit/test_pathutils.cxx index 37e6259df120..30fbd5884015 100644 --- a/tools/qa/cppunit/test_pathutils.cxx +++ b/tools/qa/cppunit/test_pathutils.cxx @@ -31,7 +31,7 @@ namespace { void buildPath( wchar_t const * front, wchar_t const * back, wchar_t const * path) { -#if defined WNT +#if defined(_WIN32) wchar_t p[MAX_PATH]; wchar_t * e = tools::buildPath( p, front, front + std::wcslen(front), back, std::wcslen(back)); diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index e8798b798e45..8b5cd2ba9dba 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined( WNT ) +#if defined(_WIN32) #include <windows.h> #else #include <time.h> @@ -144,7 +144,7 @@ static Date lcl_DaysToDate( long nDays ) Date::Date( DateInitSystem ) { -#if defined WNT +#if defined(_WIN32) SYSTEMTIME aDateTime; GetLocalTime( &aDateTime ); diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index b6bdf040d579..91c8ea09223a 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -21,7 +21,7 @@ #include <cerrno> -#if defined( WNT ) +#if defined(_WIN32) #include <windows.h> #elif defined UNX #include <unistd.h> @@ -92,7 +92,7 @@ namespace tools { Time::Time( TimeInitSystem ) { -#if defined( WNT ) +#if defined(_WIN32) SYSTEMTIME aDateTime; GetLocalTime( &aDateTime ); @@ -354,7 +354,7 @@ bool tools::Time::IsEqualIgnoreNanoSec( const tools::Time& rTime ) const Time tools::Time::GetUTCOffset() { -#if defined( WNT ) +#if defined(_WIN32) TIME_ZONE_INFORMATION aTimeZone; aTimeZone.Bias = 0; DWORD nTimeZoneRet = GetTimeZoneInformation( &aTimeZone ); @@ -411,7 +411,7 @@ Time tools::Time::GetUTCOffset() sal_uInt64 tools::Time::GetSystemTicks() { -#if defined WNT +#if defined(_WIN32) static LARGE_INTEGER nTicksPerSecond; static bool bTicksPerSecondInitialized = false; if (!bTicksPerSecondInitialized) diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index 23dead7e935a..40fc492ec605 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -23,7 +23,7 @@ #include <new> #include <string.h> -#ifdef WNT +#ifdef _WIN32 #include "stdlib.h" #endif @@ -183,7 +183,7 @@ OString makeOString(const sal_uInt8* p, sal_uInt64 n) { if (n > SAL_MAX_INT32) { - #ifdef WNT + #ifdef _WIN32 abort(); #else ::std::abort(); //TODO: handle this gracefully diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index d0b638a66a99..539496cd0917 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -162,7 +162,7 @@ inline bool startsWithLineFolding(const sal_Unicode * pBegin, inline rtl_TextEncoding translateToMIME(rtl_TextEncoding eEncoding) { -#if defined WNT +#if defined(_WIN32) return eEncoding == RTL_TEXTENCODING_MS_1252 ? RTL_TEXTENCODING_ISO_8859_1 : eEncoding; #else // WNT @@ -173,7 +173,7 @@ inline rtl_TextEncoding translateToMIME(rtl_TextEncoding eEncoding) inline rtl_TextEncoding translateFromMIME(rtl_TextEncoding eEncoding) { -#if defined WNT +#if defined(_WIN32) return eEncoding == RTL_TEXTENCODING_ISO_8859_1 ? RTL_TEXTENCODING_MS_1252 : eEncoding; #else @@ -830,7 +830,7 @@ createPreferredCharsetList(rtl_TextEncoding eEncoding) // <ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT> // version 1.0 of 18 August 1999 -#if defined WNT +#if defined(_WIN32) static const sal_uInt32 aWindows1252Ranges[] = { 0, 0x7F, 0xA0, 0xFF, 0x152, 0x153, 0x160, 0x161, 0x178, 0x178, 0x17D, 0x17E, 0x192, 0x192, 0x2C6, 0x2C6, 0x2DC, 0x2DC, @@ -845,7 +845,7 @@ createPreferredCharsetList(rtl_TextEncoding eEncoding) switch (eEncoding) { case RTL_TEXTENCODING_MS_1252: -#if defined WNT +#if defined(_WIN32) pList->prepend(Charset(RTL_TEXTENCODING_MS_1252, aWindows1252Ranges)); #endif // WNT diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx index 577e5491b5ca..d939483e4764 100644 --- a/tools/source/misc/pathutils.cxx +++ b/tools/source/misc/pathutils.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#if defined WNT +#if defined(_WIN32) #include <cstddef> #define WIN32_LEAN_AND_MEAN diff --git a/tools/source/stream/strmsys.cxx b/tools/source/stream/strmsys.cxx index 0c9edfc49a1d..61c74648e18b 100644 --- a/tools/source/stream/strmsys.cxx +++ b/tools/source/stream/strmsys.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined WNT +#if defined(_WIN32) #include "strmwnt.cxx" #elif defined UNX #include "strmunx.cxx" diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 2967df018977..3618d217f427 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -22,7 +22,7 @@ #include <string.h> #include <limits.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif |