mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 08:46:44 +01:00
Merge pull request #2619 from diorcety/winxp
Partial Windows XP support
This commit is contained in:
commit
cb266ee073
@ -66,10 +66,9 @@ extern "C" {
|
||||
|
||||
#ifdef __MINGW32__
|
||||
// Require Windows XP or higher with MinGW for getaddrinfo().
|
||||
#if(_WIN32_WINNT >= 0x0600)
|
||||
#if(_WIN32_WINNT >= 0x0501)
|
||||
#else
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#error You need at least Windows XP target
|
||||
#endif
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
|
@ -39,9 +39,22 @@
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
|
||||
#include "windows.hpp"
|
||||
#if defined(_MSC_VER)
|
||||
#if _MSC_VER >= 1800
|
||||
#define _SUPPORT_CONDITION_VARIABLE 1
|
||||
#else
|
||||
#define _SUPPORT_CONDITION_VARIABLE 0
|
||||
#endif
|
||||
#else
|
||||
#if _cplusplus >= 201103L
|
||||
#define _SUPPORT_CONDITION_VARIABLE 1
|
||||
#else
|
||||
#define _SUPPORT_CONDITION_VARIABLE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Condition variable is supported from Windows Vista only, to use condition variable define _WIN32_WINNT to 0x0600
|
||||
#if _WIN32_WINNT < 0x0600
|
||||
#if _WIN32_WINNT < 0x0600 && !_SUPPORT_CONDITION_VARIABLE
|
||||
|
||||
namespace zmq
|
||||
{
|
||||
@ -81,7 +94,7 @@ namespace zmq
|
||||
|
||||
#else
|
||||
|
||||
#ifdef ZMQ_HAVE_WINDOWS_TARGET_XP
|
||||
#if _SUPPORT_CONDITION_VARIABLE || defined(ZMQ_HAVE_WINDOWS_TARGET_XP)
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#endif
|
||||
@ -89,7 +102,7 @@ namespace zmq
|
||||
namespace zmq
|
||||
{
|
||||
|
||||
#ifndef ZMQ_HAVE_WINDOWS_TARGET_XP
|
||||
#if !defined(ZMQ_HAVE_WINDOWS_TARGET_XP) && _WIN32_WINNT >= 0x0600
|
||||
class condition_variable_t
|
||||
{
|
||||
public:
|
||||
|
@ -49,10 +49,9 @@
|
||||
|
||||
#ifdef __MINGW32__
|
||||
// Require Windows XP or higher with MinGW for getaddrinfo().
|
||||
#if(_WIN32_WINNT >= 0x0600)
|
||||
#if(_WIN32_WINNT >= 0x0501)
|
||||
#else
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#error You need at least Windows XP target
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user