*: 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:
@@ -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)
|
||||
|
@@ -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.
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
#include <winsock.h>
|
||||
#else
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include "config.h"
|
||||
#include "SignalMonitor.hxx"
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
|
||||
#include "SocketMonitor.hxx"
|
||||
#include "util/Manual.hxx"
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
class EventLoop;
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
|
||||
#include "util/BindMethod.hxx"
|
||||
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user