mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
Problem: inclusion of winsock2.h leads to ordering issues in user code.
Solution: don't include winsock2.h, replace its only use (reference to SOCKET) by explicitly naming underlying type.
This commit is contained in:
parent
3ecaf9fe6e
commit
cb211e4f1e
@ -71,7 +71,6 @@ extern "C" {
|
|||||||
#error You need at least Windows XP target
|
#error You need at least Windows XP target
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Handle DSO symbol visibility */
|
/* Handle DSO symbol visibility */
|
||||||
@ -498,7 +497,12 @@ ZMQ_EXPORT int zmq_socket_monitor (void *s_, const char *addr_, int events_);
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
typedef SOCKET zmq_fd_t;
|
// Windows uses a pointer-sized unsigned integer to store the socket fd.
|
||||||
|
#if defined _WIN64
|
||||||
|
typedef unsigned __int64 zmq_fd_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned int zmq_fd_t;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
typedef int zmq_fd_t;
|
typedef int zmq_fd_t;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user