From c7fb5c54b688c1817d0604320ac7f9bb3aa02c5c Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Mon, 13 Jun 2011 07:53:22 +0200 Subject: Reverting previous commit that broke MSVC2010 build Signed-off-by: Martin Sustrik --- src/ctx.cpp | 8 ++------ src/select.cpp | 2 +- src/select.hpp | 2 +- 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 -#include +#include "windows.h" #else -#include +#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 #ifdef ZMQ_HAVE_WINDOWS -#include +#include "winsock2.h" #elif defined ZMQ_HAVE_HPUX #include #include 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 #ifdef ZMQ_HAVE_WINDOWS -#include +#include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include 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 + // MSVC++ 2005 on Win2000 does not define _WIN32_WINNT. #ifndef _WIN32_WINNT #define _WIN32_WINNT WINVER @@ -66,7 +68,6 @@ #include #endif -#include #include #include #include -- cgit v1.2.3