summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app_thread.cpp3
-rw-r--r--src/fd.hpp2
-rw-r--r--src/windows.hpp5
3 files changed, 9 insertions, 1 deletions
diff --git a/src/app_thread.cpp b/src/app_thread.cpp
index d12b126..fbda335 100644
--- a/src/app_thread.cpp
+++ b/src/app_thread.cpp
@@ -25,6 +25,9 @@
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
+#if defined _MSC_VER
+#include <intrin.h>
+#endif
#else
#include <unistd.h>
#endif
diff --git a/src/fd.hpp b/src/fd.hpp
index 92cabf6..c92d819 100644
--- a/src/fd.hpp
+++ b/src/fd.hpp
@@ -31,7 +31,7 @@ namespace zmq
#ifdef ZMQ_HAVE_WINDOWS
#if defined _MSC_VER &&_MSC_VER <= 1400
typedef UINT_PTR fd_t;
- enum {retired_fd = (fd_t)(~0)}
+ enum {retired_fd = (fd_t)(~0)};
#else
typedef SOCKET fd_t;
enum {retired_fd = INVALID_SOCKET};
diff --git a/src/windows.hpp b/src/windows.hpp
index 71ecd4f..d765c83 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
@@ -47,6 +47,11 @@
#include <windows.h>
+// MSVC++ 2005 on Win2000 does not define _WIN32_WINNT.
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT WINVER
+#endif
+
// Enable winsock (not included when WIN32_LEAN_AND_MEAN is defined).
#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>