*: check defined(_WIN32) instead of defined(WIN32)

Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
This commit is contained in:
Max Kellermann
2017-12-12 10:22:20 +01:00
parent d9552d8a6d
commit dfaf08743c
91 changed files with 226 additions and 225 deletions

View File

@@ -23,7 +23,7 @@
#include <algorithm>
#ifndef WIN32
#ifndef _WIN32
#include <poll.h>
#endif
@@ -50,7 +50,7 @@ MultiSocketMonitor::ClearSocketList()
fds.clear();
}
#ifndef WIN32
#ifndef _WIN32
void
MultiSocketMonitor::ReplaceSocketList(pollfd *pfds, unsigned n)

View File

@@ -31,7 +31,7 @@
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
/* ERROR is a WIN32 macro that poisons our namespace; this is a kludge
to allow us to use it anyway */
#ifdef ERROR
@@ -39,7 +39,7 @@
#endif
#endif
#ifndef WIN32
#ifndef _WIN32
struct pollfd;
#endif
@@ -189,7 +189,7 @@ public:
}
}
#ifndef WIN32
#ifndef _WIN32
/**
* Replace the socket list with the given file descriptors.
* The given pollfd array will be modified by this method.

View File

@@ -43,7 +43,7 @@
#include <unistd.h>
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <ws2tcpip.h>
#include <winsock.h>
#else

View File

@@ -20,7 +20,7 @@
#include "config.h"
#include "SignalMonitor.hxx"
#ifndef WIN32
#ifndef _WIN32
#include "SocketMonitor.hxx"
#include "util/Manual.hxx"

View File

@@ -24,7 +24,7 @@
class EventLoop;
#ifndef WIN32
#ifndef _WIN32
#include "util/BindMethod.hxx"

View File

@@ -24,7 +24,7 @@
#include <assert.h>
#ifdef WIN32
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>

View File

@@ -28,7 +28,7 @@
#include <assert.h>
#include <stddef.h>
#ifdef WIN32
#ifdef _WIN32
/* ERROR is a WIN32 macro that poisons our namespace; this is a kludge
to allow us to use it anyway */
#ifdef ERROR