summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-16 11:26:51 +0200
committerMichael Stahl <mstahl@redhat.com>2016-02-16 10:37:55 +0000
commitce43d0ae9279edbf1ad108fe0d8325327a038d49 (patch)
treea0fbf7bbd608d1185005a0de36496c6f3656e798
parent049cf885c6e6c12ac9fa20bcb4ca1472de5b9115 (diff)
use consistent #define checks for the Windows platform
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--basic/source/sbx/sbxdec.cxx10
-rw-r--r--basic/source/sbx/sbxdec.hxx4
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx4
-rw-r--r--cppuhelper/test/bootstrap/bootstrap.test.cxx2
-rw-r--r--desktop/source/app/cmdlineargs.cxx2
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx12
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx6
-rw-r--r--extensions/source/scanner/scanner.hxx2
-rw-r--r--external/curl/curl-7.26.0_win-proxy.patch6
-rw-r--r--external/neon/configs/config.h8
-rw-r--r--external/neon/neon.patch4
-rw-r--r--external/redland/raptor/raptor_config.h2
-rw-r--r--hwpfilter/source/fontmap.cxx20
-rw-r--r--hwpfilter/source/hiodev.cxx2
-rw-r--r--hwpfilter/source/htags.cxx8
-rw-r--r--hwpfilter/source/htags.h2
-rw-r--r--hwpfilter/source/hwpeq.cxx4
-rw-r--r--hwpfilter/source/hwpreader.cxx2
-rw-r--r--hwpfilter/source/lexer.cxx6
-rw-r--r--hwpfilter/source/mzstring.cxx14
-rw-r--r--include/sal/config.h2
-rw-r--r--onlineupdate/source/libmar/inc/mozilla/Assertions.h2
-rw-r--r--onlineupdate/source/libmar/inc/mozilla/Types.h2
-rw-r--r--onlineupdate/source/update/inc/mozilla/Assertions.h2
-rw-r--r--onlineupdate/source/update/inc/mozilla/Types.h2
-rw-r--r--registry/source/registry.cxx2
-rw-r--r--sal/cppunittester/cppunittester.cxx2
-rw-r--r--sal/qa/osl/file/osl_old_test_file.cxx8
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx2
-rw-r--r--sc/workben/opencl/platform_detect.cxx2
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx2
-rw-r--r--sd/source/ui/remotecontrol/BufferedStreamSocket.cxx4
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx4
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx4
-rw-r--r--sfx2/source/doc/syspathw32.cxx2
-rw-r--r--shell/inc/internal/zipfile.hxx4
-rw-r--r--soltools/mkdepend/def.h2
-rw-r--r--soltools/mkdepend/ifparser.c2
-rw-r--r--soltools/mkdepend/imakemdep.h10
-rw-r--r--soltools/mkdepend/main.c2
-rw-r--r--stoc/test/testregistry.cxx2
-rw-r--r--stoc/test/testsmgr.cxx2
-rw-r--r--svtools/source/config/optionsdrawinglayer.cxx2
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx12
-rw-r--r--tools/source/fsys/urlobj.cxx2
-rw-r--r--vcl/inc/salglyphid.hxx2
-rw-r--r--vcl/inc/sft.hxx2
-rw-r--r--vcl/opengl/win/WinDeviceInfo.cxx2
-rw-r--r--vcl/source/fontsubset/sft.cxx4
-rw-r--r--vcl/source/outdev/transparent.cxx2
51 files changed, 96 insertions, 120 deletions
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 8a956c8dfd7c..1616771bc4c3 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -34,7 +34,7 @@ SbxDecimal::SbxDecimal()
SbxDecimal::SbxDecimal( const SbxDecimal& rDec )
{
-#ifdef WIN32
+#ifdef _WIN32
maDec = rDec.maDec;
#else
(void)rDec;
@@ -45,7 +45,7 @@ SbxDecimal::SbxDecimal( const SbxDecimal& rDec )
SbxDecimal::SbxDecimal
( const css::bridge::oleautomation::Decimal& rAutomationDec )
{
-#ifdef WIN32
+#ifdef _WIN32
maDec.scale = rAutomationDec.Scale;
maDec.sign = rAutomationDec.Sign;
maDec.Lo32 = rAutomationDec.LowValue;
@@ -60,7 +60,7 @@ SbxDecimal::SbxDecimal
void SbxDecimal::fillAutomationDecimal
( css::bridge::oleautomation::Decimal& rAutomationDec )
{
-#ifdef WIN32
+#ifdef _WIN32
rAutomationDec.Scale = maDec.scale;
rAutomationDec.Sign = maDec.sign;
rAutomationDec.LowValue = maDec.Lo32;
@@ -88,7 +88,7 @@ void releaseDecimalPtr( SbxDecimal*& rpDecimal )
}
}
-#ifdef WIN32
+#ifdef _WIN32
bool SbxDecimal::operator -= ( const SbxDecimal &r )
{
@@ -351,7 +351,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; }
void SbxDecimal::getString( OUString& rString )
{
-#ifdef WIN32
+#ifdef _WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
bool bRet = false;
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 957ffd03c0d5..eb71f2c9f50f 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -45,7 +45,7 @@ class SbxDecimal
{
friend void releaseDecimalPtr( SbxDecimal*& rpDecimal );
-#ifdef WIN32
+#ifdef _WIN32
DECIMAL maDec;
#endif
sal_Int32 mnRefCount;
@@ -75,7 +75,7 @@ public:
bool setString( OUString* pOUString );
void setDecimal( SbxDecimal* pDecimal )
{
-#ifdef WIN32
+#ifdef _WIN32
if( pDecimal )
maDec = pDecimal->maDec;
#else
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index e5f264315e58..29f4e19bd679 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -45,7 +45,7 @@ namespace
::osl::Security aSecurity;
OUString aConfigPath;
- #if defined(XP_WIN) || defined(MACOSX)
+ #if defined(_WIN32) || defined(MACOSX)
aSecurity.getConfigDir( aConfigPath );
#else
//This is to find the dir under which .mozilla/.thunderbird is created.
@@ -67,7 +67,7 @@ namespace
// DO NOT CHANGE THE ORDER; ADD ONLY TO THE END
static const char* DefaultProductDir[NB_PRODUCTS][NB_CANDIDATES] =
{
- #if defined(XP_WIN)
+ #if defined(_WIN32)
{ "Mozilla/SeaMonkey/", NULL, NULL, NULL },
{ "Mozilla/Firefox/", NULL, NULL, NULL },
{ "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
diff --git a/cppuhelper/test/bootstrap/bootstrap.test.cxx b/cppuhelper/test/bootstrap/bootstrap.test.cxx
index d4d766e54acb..90c9fb3cb59e 100644
--- a/cppuhelper/test/bootstrap/bootstrap.test.cxx
+++ b/cppuhelper/test/bootstrap/bootstrap.test.cxx
@@ -88,7 +88,7 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
uno::Reference<uno::XInterface> xItf(
cppu::loadSharedLibComponentFactory(
rtl::OUString(SAL_DLLPREFIX "TestComponent.uno" SAL_DLLEXTENSION),
-#ifdef WIN32
+#ifdef _WIN32
"",
#else
"file://../lib/",
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index b2b1ba8ce0d1..8fe553206895 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -299,7 +299,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
exit(0);
}
#endif
-#ifdef WIN32
+#ifdef _WIN32
/* fdo#57203 ignore -Embedding on Windows
when LibreOffice is launched by COM+
*/
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx
index 69f7472a1129..2aac505e80b7 100644
--- a/desktop/win32/source/applauncher/launcher.cxx
+++ b/desktop/win32/source/applauncher/launcher.cxx
@@ -19,17 +19,7 @@
#include "launcher.hxx"
-#ifndef _WINDOWS_
-# define WIN32_LEAN_AND_MEAN
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-# include <windows.h>
-# include <shellapi.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-#endif
+#include <shellapi.h>
#include <stdlib.h>
#include <malloc.h>
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index bec31951dd37..e249ddd84044 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -380,7 +380,7 @@ namespace drawinglayer
const sal_uInt32 nWidth(basegfx::fround(fabs(fFontScaleX)));
const bool bFontIsScaled(nHeight != nWidth);
-#ifdef WIN32
+#ifdef _WIN32
// for WIN32 systems, start with creating an unscaled font. If FontScaling
// is wanted, that width needs to be adapted using FontMetric again to get a
// width of the unscaled font
@@ -409,7 +409,7 @@ namespace drawinglayer
aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, false));
-#ifdef WIN32
+#ifdef _WIN32
// for WIN32 systems, correct the FontWidth if FontScaling is used
if(bFontIsScaled && nHeight > 0)
{
@@ -456,7 +456,7 @@ namespace drawinglayer
o_rSize.setY(rFont.GetFontSize().getHeight() > 0 ? rFont.GetFontSize().getHeight() : 0);
o_rSize.setX(o_rSize.getY());
-#ifdef WIN32
+#ifdef _WIN32
// for WIN32 systems, the FontScaling at the Font is detected by
// checking that FontWidth != 0. When FontScaling is used, WIN32
// needs to do extra stuff to detect the correct width (since it's
diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx
index 10b17bb04b6b..8b777b6c9f94 100644
--- a/extensions/source/scanner/scanner.hxx
+++ b/extensions/source/scanner/scanner.hxx
@@ -80,7 +80,7 @@ public:
static OUString getImplementationName_Static() throw();
static Sequence< OUString > getSupportedServiceNames_Static() throw();
-#ifdef WIN32
+#ifdef _WIN32
void* GetData() const { return mpData; }
#endif
void SetData( void* pData ) { ReleaseData(); mpData = pData; }
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch
index 99402a437e5a..81ccc65aab53 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -15,7 +15,7 @@
int curl_win32_idn_to_ascii(const char *in, char **out);
#endif /* USE_LIBIDN */
-+#ifdef WIN32
++#ifdef _WIN32
+#include <WinHttp.h>
+#endif
+
@@ -26,7 +26,7 @@
return FALSE;
}
-+#ifdef WIN32
++#ifdef _WIN32
+static char* wstrToCstr( LPWSTR wStr )
+{
+ int bufSize;
@@ -57,7 +57,7 @@
* checked if the lowercase versions don't exist.
*/
- char *no_proxy=NULL;
-+#ifdef WIN32
++#ifdef _WIN32
+ WINHTTP_CURRENT_USER_IE_PROXY_CONFIG *ieProxyConfig;
+ ieProxyConfig = (WINHTTP_CURRENT_USER_IE_PROXY_CONFIG*)
+ malloc(sizeof(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG));
diff --git a/external/neon/configs/config.h b/external/neon/configs/config.h
index 232ea3c6916d..996f74412af2 100644
--- a/external/neon/configs/config.h
+++ b/external/neon/configs/config.h
@@ -25,7 +25,7 @@
/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
don't. */
-#ifdef WIN32
+#ifdef _WIN32
#define HAVE_DECL_H_ERRNO 1
#endif
@@ -239,7 +239,7 @@
#define HAVE_SNPRINTF 1
#endif
-#ifdef WIN32
+#ifdef _WIN32
#if _MSC_VER >= 1900 // VS 2015
#define HAVE_SNPRINTF 1
#else
@@ -274,7 +274,7 @@
#define HAVE_STRCASECMP 1
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define strcasecmp strcmpi
#endif
@@ -588,7 +588,7 @@
char *stpcpy(char *, const char *);
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <io.h>
diff --git a/external/neon/neon.patch b/external/neon/neon.patch
index de52043d3dc1..a88c7d22e2c4 100644
--- a/external/neon/neon.patch
+++ b/external/neon/neon.patch
@@ -366,7 +366,7 @@
#include <pthread.h>
#endif
-+#ifdef WIN32
++#ifdef _WIN32
+#define X509_NAME WIN32_X509_NAME
+#include <windows.h>
+#include <wincrypt.h>
@@ -380,7 +380,7 @@
X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL);
#else
X509_STORE_set_default_paths(store);
-+#ifdef WIN32
++#ifdef _WIN32
+ {
+ HCERTSTORE hStore;
+ PCCERT_CONTEXT pContext = NULL;
diff --git a/external/redland/raptor/raptor_config.h b/external/redland/raptor/raptor_config.h
index 22462ff55f38..62b2880d10f7 100644
--- a/external/redland/raptor/raptor_config.h
+++ b/external/redland/raptor/raptor_config.h
@@ -339,7 +339,7 @@
// from raptor_config_cmake.h.in ////////////////////////////////////////////
-#ifdef WIN32
+#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# ifndef _CRT_NONSTDC_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
diff --git a/hwpfilter/source/fontmap.cxx b/hwpfilter/source/fontmap.cxx
index 259722ee791d..8de154283ba1 100644
--- a/hwpfilter/source/fontmap.cxx
+++ b/hwpfilter/source/fontmap.cxx
@@ -117,8 +117,15 @@ const struct FontEntry FontMapTab[] =
{"\xbd\xc5\xb8\xed \xb1\xc3\xbc\xad",3, 0.97}
};
-#ifndef WIN32
-#if defined(LINUX)
+#if defined(_WIN32)
+const char* RepFontTab[] =
+{
+ "\xb9\xd9\xc5\xc1", /* 0 */
+ "\xb5\xb8\xbf\xf2", /* 1 */
+ "\xb1\xbc\xb8\xb2", /* 2 */
+ "\xb1\xc3\xbc\xad" /* 3 */
+};
+#elif defined(LINUX)
const char* RepFontTab[] =
{
"\xb9\xe9\xb9\xac \xb9\xd9\xc5\xc1", /* 0 */
@@ -135,15 +142,6 @@ const char* RepFontTab[] =
"Gungso" /* 3 */
};
#endif
-#else
-const char* RepFontTab[] =
-{
- "\xb9\xd9\xc5\xc1", /* 0 */
- "\xb5\xb8\xbf\xf2", /* 1 */
- "\xb1\xbc\xb8\xb2", /* 2 */
- "\xb1\xc3\xbc\xad" /* 3 */
-};
-#endif
int getRepFamilyName(const char* orig, char *buf, double &ratio)
{
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index b6195f0106e0..a5e035741dbb 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
# include <io.h>
#else
# include <unistd.h>
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index 3bc004a89d26..044f7d2a6a61 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -52,7 +52,7 @@ EmPicture::EmPicture(size_t tsize)
else
data = new uchar[size];
}
-#ifdef WIN32
+#ifdef _WIN32
#define unlink _unlink
#endif
EmPicture::~EmPicture()
@@ -83,14 +83,14 @@ OlePicture::OlePicture(int tsize)
size = tsize - 4;
if (size <= 0)
return;
-#ifndef WIN32
+#ifndef _WIN32
pis = new char[size];
#endif
};
OlePicture::~OlePicture()
{
-#ifdef WIN32
+#ifdef _WIN32
if( pis )
pis->Release();
#else
@@ -109,7 +109,7 @@ void OlePicture::Read(HWPFile & hwpf)
hwpf.Read4b(&signature, 1);
if (signature != FILESTG_SIGNATURE_NORMAL)
return;
-#ifdef WIN32
+#ifdef _WIN32
char *data = new char[size];
if (hwpf.ReadBlock(data,size) == 0)
{
diff --git a/hwpfilter/source/htags.h b/hwpfilter/source/htags.h
index 2e07978d23b5..292897b47bcd 100644
--- a/hwpfilter/source/htags.h
+++ b/hwpfilter/source/htags.h
@@ -55,7 +55,7 @@ struct OlePicture
{
int size;
uint signature;
-#ifdef WIN32
+#ifdef _WIN32
IStorage *pis;
#else
char *pis;
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index dfd2d0a88a8e..dd461103a1a6 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -33,7 +33,7 @@ using namespace std;
#include <sal/macros.h>
/* @Man: change the hwp formula to LaTeX */
-#ifdef WIN32
+#ifdef _WIN32
# define ENDL "\r\n"
#else /* !WIN32 */
# define ENDL "\n"
@@ -48,7 +48,7 @@ using namespace std;
#define IS_WS(ch) (strchr(WS, ch))
#define IS_BINARY(ch) (strchr("+-<=>", ch))
-#ifdef WIN32
+#ifdef _WIN32
#define STRICMP stricmp
#else
#define STRICMP strcasecmp
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index dab0d658a923..e981ce0a9238 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -3921,7 +3921,7 @@ void HwpReader::makePicture(Picture * hbox)
}
else{
if( hwpfile.oledata ){
-#ifdef WIN32
+#ifdef _WIN32
LPSTORAGE srcsto;
LPUNKNOWN pObj;
wchar_t pathname[200];
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index e7518ab38c25..aa435d5fcdce 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -48,7 +48,7 @@
#ifdef __cplusplus
#include <stdlib.h>
-#ifndef WIN32
+#ifndef _WIN32
#include <unistd.h>
#else
#include <io.h>
@@ -960,7 +960,7 @@ char *yytext;
#include <string.h>
#include "nodes.h"
-#ifdef WIN32
+#ifdef _WIN32
#define strdup _strdup
#define fileno _fileno
#define isatty _isatty
@@ -975,7 +975,7 @@ int yywrap();
}
#endif
-#ifdef WIN32
+#ifdef _WIN32
extern YYSTYPE yylval;
#endif
#ifdef TOKEN_DEBUG
diff --git a/hwpfilter/source/mzstring.cxx b/hwpfilter/source/mzstring.cxx
index f5e7b9283a21..483809a5fbcb 100644
--- a/hwpfilter/source/mzstring.cxx
+++ b/hwpfilter/source/mzstring.cxx
@@ -23,22 +23,14 @@
#include "mzstring.h"
-#ifndef WIN32
-#else
-
- #if defined _MSC_VER
- #pragma warning(push, 1)
- #endif
+#ifdef _WIN32
# include <windows.h>
- #if defined _MSC_VER
- #pragma warning(pop)
- #endif
-#endif /* WIN32 */
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef WIN32
+#ifndef _WIN32
# define wsprintf sprintf
#endif
diff --git a/include/sal/config.h b/include/sal/config.h
index f53d01acc3a8..ea3e897c003f 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#ifdef WIN32
+#ifdef _WIN32
#define SAL_W32
#define SAL_DLLEXTENSION ".dll"
#define SAL_PATHSEPARATOR ';'
diff --git a/onlineupdate/source/libmar/inc/mozilla/Assertions.h b/onlineupdate/source/libmar/inc/mozilla/Assertions.h
index c72e020806cd..5669091bbb8e 100644
--- a/onlineupdate/source/libmar/inc/mozilla/Assertions.h
+++ b/onlineupdate/source/libmar/inc/mozilla/Assertions.h
@@ -24,7 +24,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef WIN32
+#ifdef _WIN32
/*
* TerminateProcess and GetCurrentProcess are defined in <winbase.h>, which
* further depends on <windef.h>. We hardcode these few definitions manually
diff --git a/onlineupdate/source/libmar/inc/mozilla/Types.h b/onlineupdate/source/libmar/inc/mozilla/Types.h
index a5d936389d99..9d1e34b6d1d6 100644
--- a/onlineupdate/source/libmar/inc/mozilla/Types.h
+++ b/onlineupdate/source/libmar/inc/mozilla/Types.h
@@ -37,7 +37,7 @@
* These macros are designed for use by library interfaces -- not for normal
* methods or data used cross-file.
*/
-#if defined(WIN32)
+#if defined(_WIN32)
# define MOZ_EXPORT __declspec(dllexport)
#else /* Unix */
# ifdef HAVE_VISIBILITY_ATTRIBUTE
diff --git a/onlineupdate/source/update/inc/mozilla/Assertions.h b/onlineupdate/source/update/inc/mozilla/Assertions.h
index c72e020806cd..5669091bbb8e 100644
--- a/onlineupdate/source/update/inc/mozilla/Assertions.h
+++ b/onlineupdate/source/update/inc/mozilla/Assertions.h
@@ -24,7 +24,7 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef WIN32
+#ifdef _WIN32
/*
* TerminateProcess and GetCurrentProcess are defined in <winbase.h>, which
* further depends on <windef.h>. We hardcode these few definitions manually
diff --git a/onlineupdate/source/update/inc/mozilla/Types.h b/onlineupdate/source/update/inc/mozilla/Types.h
index a5d936389d99..9d1e34b6d1d6 100644
--- a/onlineupdate/source/update/inc/mozilla/Types.h
+++ b/onlineupdate/source/update/inc/mozilla/Types.h
@@ -37,7 +37,7 @@
* These macros are designed for use by library interfaces -- not for normal
* methods or data used cross-file.
*/
-#if defined(WIN32)
+#if defined(_WIN32)
# define MOZ_EXPORT __declspec(dllexport)
#else /* Unix */
# ifdef HAVE_VISIBILITY_ATTRIBUTE
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 0b355fa98c7f..a2e5dd201292 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -27,7 +27,7 @@
#include "regimpl.hxx"
#include "regkey.hxx"
-#if defined(WIN32) || defined(WNT)
+#if defined(_WIN32)
#include <io.h>
#endif
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index fa0c57934e45..7bc32f8db3c7 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -247,7 +247,7 @@ public:
manager.load(testlib, args);
} catch (const CppUnit::DynamicLibraryManagerException &e) {
std::cerr << "DynamicLibraryManagerException: \"" << e.what() << "\"\n";
-#ifdef WIN32
+#ifdef _WIN32
const char *pPath = getenv ("PATH");
if (pPath && strlen (pPath) > 256)
{
diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx
index 8444baf70f04..8db4b25823b7 100644
--- a/sal/qa/osl/file/osl_old_test_file.cxx
+++ b/sal/qa/osl/file/osl_old_test_file.cxx
@@ -52,7 +52,7 @@ public:
CPPUNIT_TEST_SUITE_END( );
};
-#ifndef WIN32
+#ifndef _WIN32
const char * const aSource1[] =
{
"a" , "file:///" TEST_VOLUME "bla/a",
@@ -87,7 +87,7 @@ using ::rtl::OString;
void oldtestfile::test_file_001()
{
-#ifndef WIN32
+#ifndef _WIN32
OUString base1( "file:///" TEST_VOLUME "bla" );
int i;
for( i = 0 ; aSource1[i] ; i +=2 )
@@ -106,7 +106,7 @@ void oldtestfile::test_file_001()
void oldtestfile::test_file_002()
{
-#ifndef WIN32
+#ifndef _WIN32
OUString base2( "file:///" TEST_VOLUME "bla/blubs/schnubbel" );
int i;
for( i = 0 ; aSource2[i] ; i +=2 )
@@ -125,7 +125,7 @@ void oldtestfile::test_file_002()
void oldtestfile::test_file_004()
{
-#ifndef WIN32
+#ifndef _WIN32
OUString base4( "file:///" TEST_VOLUME "bla/" );
int i;
for( i = 0 ; aSource1[i] ; i +=2 )
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index fd92c7bde008..4cb633332782 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -82,7 +82,7 @@ static const char* publicFunc =
"double strequal(unsigned a, unsigned b) { return (a==b)?1.0:0; }\n"
;
-#ifdef WIN32
+#ifdef _WIN32
#ifndef NAN
namespace {
diff --git a/sc/workben/opencl/platform_detect.cxx b/sc/workben/opencl/platform_detect.cxx
index 5fb2544c54cc..d6d358d3e91b 100644
--- a/sc/workben/opencl/platform_detect.cxx
+++ b/sc/workben/opencl/platform_detect.cxx
@@ -7,7 +7,7 @@
using namespace std;
-#ifdef WIN32
+#ifdef _WIN32
#define OPENCL_DLL_NAME "OpenCL.dll"
#elif defined(MACOSX)
#define OPENCL_DLL_NAME NULL
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index b29ce38d926b..f177d86509e5 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -29,7 +29,7 @@
#include "BufferedStreamSocket.hxx"
#endif
-#ifdef WIN32
+#ifdef _WIN32
// LO vs WinAPI conflict
#undef WB_LEFT
#undef WB_RIGHT
diff --git a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
index 3346c856f095..d628396df347 100644
--- a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
+++ b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
@@ -11,7 +11,7 @@
#include <algorithm>
-#ifdef WIN32
+#ifdef _WIN32
// LO vs WinAPI conflict
#undef WB_LEFT
#undef WB_RIGHT
@@ -70,7 +70,7 @@ void BufferedStreamSocket::close()
{
if( usingCSocket && mSocket != -1 )
{
-#ifdef WIN32
+#ifdef _WIN32
::closesocket( mSocket );
#else
::close( mSocket );
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 4fa31fbfe659..b545d8debc71 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -20,7 +20,7 @@
#include "DiscoveryService.hxx"
-#ifdef WIN32
+#ifdef _WIN32
// LO vs WinAPI conflict
#undef WB_LEFT
#undef WB_RIGHT
@@ -91,7 +91,7 @@ void DiscoveryService::setupSockets()
zService = new AvahiNetworkService(hostname);
#endif
-#ifdef WIN32
+#ifdef _WIN32
zService = new WINNetworkService();
#endif
diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx
index 037714ba1fca..615ee5d2c84d 100644
--- a/sdext/source/pdfimport/inc/pdfparse.hxx
+++ b/sdext/source/pdfimport/inc/pdfparse.hxx
@@ -298,7 +298,7 @@ public:
~PDFReader() {}
static PDFEntry* read( const char* pFileName );
-#ifdef WIN32
+#ifdef _WIN32
static PDFEntry* read( const char* pBuffer, unsigned int nLen );
#endif
};
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index 2f4ba2e48063..f4304b47cb2f 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -540,7 +540,7 @@ public:
}
};
-#ifdef WIN32
+#ifdef _WIN32
PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
{
PDFGrammar<const char*> aGrammar( pBuffer );
@@ -588,7 +588,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
PDFEntry* PDFReader::read( const char* pFileName )
{
-#ifdef WIN32
+#ifdef _WIN32
/* #i106583#
since converting to boost 1.39 file_iterator does not work anymore on all Windows systems
C++ stdlib istream_iterator does not allow "-" apparently
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
index 422a0e0c2e89..72b9952896e1 100644
--- a/sfx2/source/doc/syspathw32.cxx
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -59,7 +59,7 @@ static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
// time to time to very nasty compilation errors. If someone finds a better
// way to solve these probs please remove this copied part!
typedef unsigned short sal_uInt16;
-#if ( defined(WIN32) && !defined(__MINGW32__) )
+#if defined(_WIN32) && !defined(__MINGW32__)
typedef wchar_t sal_Unicode;
#else
typedef sal_uInt16 sal_Unicode;
diff --git a/shell/inc/internal/zipfile.hxx b/shell/inc/internal/zipfile.hxx
index 011881db42e7..4f4b4c2331b1 100644
--- a/shell/inc/internal/zipfile.hxx
+++ b/shell/inc/internal/zipfile.hxx
@@ -20,10 +20,6 @@
#ifndef INCLUDED_SHELL_INC_INTERNAL_ZIPFILE_HXX
#define INCLUDED_SHELL_INC_INTERNAL_ZIPFILE_HXX
-#ifndef _WINDOWS
-#define _WINDOWS
-#endif
-
#include <zlib.h>
#include <string>
diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h
index fbe603280f55..74445a2ed130 100644
--- a/soltools/mkdepend/def.h
+++ b/soltools/mkdepend/def.h
@@ -29,7 +29,7 @@ in this Software without prior written authorization from the X Consortium.
#ifndef NO_X11
#include <X11/Xosdefs.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <X11/Xw32defs.h>
#endif
#ifndef SUNOS4
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c
index 39d36426279b..274a72a7fce8 100644
--- a/soltools/mkdepend/ifparser.c
+++ b/soltools/mkdepend/ifparser.c
@@ -96,7 +96,7 @@ parse_number (IfParser *g, const char *cp, int *valp)
if (!isdigit(*cp))
return CALLFUNC(g, handle_error) (g, cp, "number");
-#ifdef WIN32
+#ifdef _WIN32
{
char *cp2;
*valp = strtol(cp, &cp2, 0);
diff --git a/soltools/mkdepend/imakemdep.h b/soltools/mkdepend/imakemdep.h
index 5252d27cce45..6211da6c322d 100644
--- a/soltools/mkdepend/imakemdep.h
+++ b/soltools/mkdepend/imakemdep.h
@@ -118,7 +118,7 @@ in this Software without prior written authorization from the X Consortium.
#define imake_ccflags "-DX_NOT_POSIX"
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define imake_ccflags "-nologo -batch -D__STDC__"
#endif
@@ -174,10 +174,10 @@ in this Software without prior written authorization from the X Consortium.
* all colons). One way to tell if you need this is to see whether or not
* your Makefiles have no tabs in them and lots of @@ strings.
*/
-#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
+#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(_WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
#define FIXUP_CPP_WHITESPACE
#endif
-#ifdef WIN32
+#ifdef _WIN32
#define REMOVE_CPP_LEADSPACE
#define INLINE_SYNTAX
#define MAGIC_MAKE_VARS
@@ -192,7 +192,7 @@ in this Software without prior written authorization from the X Consortium.
* If use cc -E but want a different compiler, define DEFAULT_CC.
* If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
*/
-#ifdef WIN32
+#ifdef _WIN32
#define USE_CC_E
#define DEFAULT_CC "cl"
#endif
@@ -433,7 +433,7 @@ char *cpp_argv[ARGUMENTS] = {
"-DSVR4",
#endif
#endif
-#ifdef WIN32
+#ifdef _WIN32
"-DWIN32",
"-nologo",
"-batch",
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 3641f4fb7fc0..8b514287e3b0 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -147,7 +147,7 @@ catch (int sig)
fatalerr ("got signal %d\n", sig);
}
-#if (defined(i386) && defined(SYSV)) || defined(WIN32)
+#if (defined(i386) && defined(SYSV)) || defined(_WIN32)
#define USGISH
#endif
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index df7e2826b7e7..07e5d099e970 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -91,7 +91,7 @@ OUString getExePath()
{
OUString exe;
OSL_VERIFY( osl_getExecutableFile( &exe.pData ) == osl_Process_E_None);
-#if defined(WIN32) || defined(WNT)
+#if defined(_WIN32)
exe = exe.copy(0, exe.getLength() - 16);
#else
exe = exe.copy(0, exe.getLength() - 12);
diff --git a/stoc/test/testsmgr.cxx b/stoc/test/testsmgr.cxx
index 666d16fa5f92..d65b1c2e3a07 100644
--- a/stoc/test/testsmgr.cxx
+++ b/stoc/test/testsmgr.cxx
@@ -47,7 +47,7 @@ OUString getExePath()
OSL_VERIFY( osl_getExecutableFile( &exe.pData) == osl_Process_E_None);
-#if defined(WIN32) || defined(WNT)
+#if defined(_WIN32)
exe = exe.copy(0, exe.getLength() - 16);
#else
exe = exe.copy(0, exe.getLength() - 12);
diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx
index 2113bcfb1308..be4e883d2af2 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -710,7 +710,7 @@ bool SvtOptionsDrawinglayer_Impl::IsAAPossibleOnThisSystem() const
SvtOptionsDrawinglayer_Impl* pThat = const_cast< SvtOptionsDrawinglayer_Impl* >(this);
pThat->m_bAllowAAChecked = true;
-#ifdef WIN32
+#ifdef _WIN32
// WIN32 uses GDIPlus with VCL for the first incarnation; this will be enhanced
// in the future to use canvases and the canvas renderer, thus a AA-abled
// canvas needs to be checked here in the future.
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index ef61d4a2150e..dce5cc112480 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -62,7 +62,7 @@ namespace tools_urlobj
== "smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii
( "file://10.10.1.1/sampledir/sample.file" ) );
@@ -89,7 +89,7 @@ namespace tools_urlobj
== "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
@@ -115,7 +115,7 @@ namespace tools_urlobj
== "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
@@ -134,7 +134,7 @@ namespace tools_urlobj
== "smb://10.10.1.1/sampledir/sample.file" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii( "file://10.10.1.1/sampledir/sample.file" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
@@ -158,7 +158,7 @@ namespace tools_urlobj
== "smb://137.65.170.24/c$/Img0001.jpg" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii( "file://137.65.170.24/c$/Img0001.jpg" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
@@ -183,7 +183,7 @@ namespace tools_urlobj
== "smb://hive-winxp-x86/pmladek/test2.odt" );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::Smb );
#endif
-#ifdef WIN
+#ifdef _WIN32
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::NO_DECODE ).
equalsAscii( "file://hive-winxp-x86/pmladek/test2.odt" ) );
CPPUNIT_ASSERT( aUrl.GetProtocol( ) == INetProtocol::File );
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 03e550e96421..57e73e4805cc 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1440,7 +1440,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
}
#endif
-#ifdef WIN
+#ifdef _WIN32
if (m_eScheme==INetProtocol::Smb) {
// Change "smb://server/path" URIs to "file://server/path"
// URIs on Windows, since Windows doesn't understand the
diff --git a/vcl/inc/salglyphid.hxx b/vcl/inc/salglyphid.hxx
index 23ce1ce02104..c449e1bd4b47 100644
--- a/vcl/inc/salglyphid.hxx
+++ b/vcl/inc/salglyphid.hxx
@@ -29,7 +29,7 @@ typedef sal_uInt32 sal_GlyphId;
#define GF_ISCHAR 0x00800000
#define GF_ROTL 0x01000000
-#ifdef WIN32
+#ifdef _WIN32
// caution !!!
#define GF_VERT 0x02000000
// GF_VERT is only for windows implementation
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index e346d83ad3fc..c7f6630bb993 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -252,7 +252,7 @@ namespace vcl
* @ingroup sft
*/
int VCL_DLLPUBLIC OpenTTFontBuffer(const void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf);
-#if !defined(WIN32)
+#if !defined(_WIN32)
/**
* TrueTypeFont constructor.
* Reads the font file and allocates the memory for the structure.
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index 729368a4b05e..161d29a9cd1a 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -345,7 +345,7 @@ bool ParseDriverVersion(const OUString& aVersion, uint64_t& rNumericVersion)
{
rNumericVersion = 0;
-#if defined(WIN32)
+#if defined(_WIN32)
int a, b, c, d;
char aStr[8], bStr[8], cStr[8], dStr[8];
/* honestly, why do I even bother */
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 608e7dbb0280..3a6921e9c5cd 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1474,7 +1474,7 @@ static void allocTrueTypeFont( TrueTypeFont** ttf )
/* forward declaration for the two entry points to use*/
static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t );
-#if !defined(WIN32)
+#if !defined(_WIN32)
int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
{
int ret, fd = -1;
@@ -1738,7 +1738,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
void CloseTTFont(TrueTypeFont *ttf)
{
-#if !defined(WIN32)
+#if !defined(_WIN32)
if( ttf->fname )
munmap(ttf->ptr, ttf->fsize);
#endif
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 040c717bfa6f..6eed4c24c162 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -303,7 +303,7 @@ bool OutputDevice::DrawTransparentNatively ( const tools::PolyPolygon& rPolyPoly
#if defined UNX && ! defined MACOSX && ! defined IOS
&& GetBitCount() > 8
#endif
-#ifdef WIN32
+#ifdef _WIN32
// workaround bad dithering on remote displaying when using GDI+ with toolbar button highlighting
&& !rPolyPoly.IsRect()
#endif