diff options
-rw-r--r-- | src/ctx.cpp | 8 | ||||
-rw-r--r-- | src/select.cpp | 2 | ||||
-rw-r--r-- | src/select.hpp | 2 | ||||
-rw-r--r-- | src/windows.hpp | 5 |
4 files changed, 7 insertions, 10 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp index 6d6242e..fb5420d 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -31,13 +31,9 @@ #include "msg.hpp" #if defined ZMQ_HAVE_WINDOWS -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include <winsock2.h> -#include <windows.h> +#include "windows.h" #else -#include <unistd.h> +#include "unistd.h" #endif zmq::ctx_t::ctx_t (uint32_t io_threads_) : diff --git a/src/select.cpp b/src/select.cpp index 891bde1..35d8bd8 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -24,7 +24,7 @@ #include <algorithm> #ifdef ZMQ_HAVE_WINDOWS -#include <winsock2.h> +#include "winsock2.h" #elif defined ZMQ_HAVE_HPUX #include <sys/param.h> #include <sys/types.h> diff --git a/src/select.hpp b/src/select.hpp index 17ebd3f..c88dd71 100644 --- a/src/select.hpp +++ b/src/select.hpp @@ -27,7 +27,7 @@ #include <vector> #ifdef ZMQ_HAVE_WINDOWS -#include <winsock2.h> +#include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include <sys/types.h> #include <sys/time.h> diff --git a/src/windows.hpp b/src/windows.hpp index fadee61..5133875 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -24,6 +24,7 @@ // The purpose of this header file is to turn on only the items actually needed // on the windows platform. +#define _WINSOCKAPI_ #ifndef NOMINMAX #define NOMINMAX // No min and max functions, these clash with C++. #endif @@ -49,10 +50,11 @@ #ifdef WINVER #undef WINVER #endif -// Default to Windows Server 2003, Windows XP #define WINVER 0x0501 #endif +#include <windows.h> + // MSVC++ 2005 on Win2000 does not define _WIN32_WINNT. #ifndef _WIN32_WINNT #define _WIN32_WINNT WINVER @@ -66,7 +68,6 @@ #include <winsock.h> #endif -#include <windows.h> #include <ws2tcpip.h> #include <ipexport.h> #include <process.h> |