mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
change minimum version to windows vista and implement dummy condition variable for lower versions
This commit is contained in:
parent
dbacc34238
commit
c2dcc80602
@ -86,14 +86,4 @@
|
|||||||
|
|
||||||
#cmakedefine ZMQ_HAVE_WINDOWS
|
#cmakedefine ZMQ_HAVE_WINDOWS
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_WINDOWS
|
|
||||||
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0600
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -29,13 +29,4 @@
|
|||||||
|
|
||||||
#define ZMQ_HAVE_WINDOWS
|
#define ZMQ_HAVE_WINDOWS
|
||||||
|
|
||||||
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0600
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,12 +29,4 @@
|
|||||||
|
|
||||||
#define ZMQ_HAVE_WINDOWS
|
#define ZMQ_HAVE_WINDOWS
|
||||||
|
|
||||||
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0600
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,6 +31,47 @@
|
|||||||
|
|
||||||
#include "windows.hpp"
|
#include "windows.hpp"
|
||||||
|
|
||||||
|
// Condition variable is supported from Windows Vista only, to use condition variable define _WIN32_WINNT to 0x0600
|
||||||
|
#if _WIN32_WINNT < 0x0600
|
||||||
|
|
||||||
|
namespace zmq
|
||||||
|
{
|
||||||
|
|
||||||
|
class condition_variable_t
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
inline condition_variable_t ()
|
||||||
|
{
|
||||||
|
zmq_assert(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline ~condition_variable_t ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int wait (mutex_t* mutex_, int timeout_ )
|
||||||
|
{
|
||||||
|
zmq_assert(false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void broadcast ()
|
||||||
|
{
|
||||||
|
zmq_assert(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Disable copy construction and assignment.
|
||||||
|
condition_variable_t (const condition_variable_t&);
|
||||||
|
void operator = (const condition_variable_t&);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
namespace zmq
|
namespace zmq
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -79,6 +120,8 @@ namespace zmq
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
#define NOMINMAX // Macros min(a,b) and max(a,b)
|
#define NOMINMAX // Macros min(a,b) and max(a,b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set target version to Windows Server 2003, Windows XP/SP1 or higher.
|
// Set target version to Windows Server 2008, Windows Vista or higher. Windows XP (0x0501) is also supported but without client & server socket types.
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT 0x0600
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user