mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +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
|
||||
|
||||
#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
|
@ -29,13 +29,4 @@
|
||||
|
||||
#define ZMQ_HAVE_WINDOWS
|
||||
|
||||
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -29,12 +29,4 @@
|
||||
|
||||
#define ZMQ_HAVE_WINDOWS
|
||||
|
||||
#if defined _WIN32_WINNT && _WIN32_WINNT < 0x0600
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -31,6 +31,47 @@
|
||||
|
||||
#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
|
||||
{
|
||||
|
||||
@ -79,6 +120,8 @@ namespace zmq
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <pthread.h>
|
||||
|
@ -27,9 +27,9 @@
|
||||
#define NOMINMAX // Macros min(a,b) and max(a,b)
|
||||
#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
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
Loading…
x
Reference in New Issue
Block a user