diff --git a/builds/msvc/vs2015/libzmq/libzmq.props b/builds/msvc/vs2015/libzmq/libzmq.props index 5c98430b..d77bdff6 100644 --- a/builds/msvc/vs2015/libzmq/libzmq.props +++ b/builds/msvc/vs2015/libzmq/libzmq.props @@ -21,13 +21,15 @@ false Use precompiled.hpp - _CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;FD_SETSIZE=16384;WIN32_LEAN_AND_MEAN;ZMQ_USE_SELECT;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;FD_SETSIZE=16384;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) ZMQ_USE_TWEETNACL;%(PreprocessorDefinitions) ZMQ_USE_LIBSODIUM;%(PreprocessorDefinitions) ZMQ_HAVE_CURVE;%(PreprocessorDefinitions) ZMQ_HAVE_OPENPGM;%(PreprocessorDefinitions) HAVE_LIBGSSAPI_KRB5;%(PreprocessorDefinitions) ZMQ_BUILD_DRAFT_API;%(PreprocessorDefinitions) + ZMQ_USE_POLL;%(PreprocessorDefinitions) + ZMQ_USE_SELECT;%(PreprocessorDefinitions) ZMQ_STATIC;%(PreprocessorDefinitions) DLL_EXPORT;%(PreprocessorDefinitions) @@ -64,6 +66,7 @@ + diff --git a/builds/msvc/vs2015/libzmq/libzmq.xml b/builds/msvc/vs2015/libzmq/libzmq.xml index b9887ddc..db7dfe03 100644 --- a/builds/msvc/vs2015/libzmq/libzmq.xml +++ b/builds/msvc/vs2015/libzmq/libzmq.xml @@ -7,6 +7,7 @@ + @@ -31,5 +32,9 @@ + + + + \ No newline at end of file diff --git a/src/poll.cpp b/src/poll.cpp index 23affbab..1f9163cf 100644 --- a/src/poll.cpp +++ b/src/poll.cpp @@ -32,8 +32,10 @@ #if defined ZMQ_USE_POLL #include +#if !defined ZMQ_HAVE_WINDOWS #include #include +#endif #include #include "poll.hpp" @@ -94,25 +96,25 @@ void zmq::poll_t::rm_fd (handle_t handle_) void zmq::poll_t::set_pollin (handle_t handle_) { - int index = fd_table [handle_].index; + fd_t index = fd_table [handle_].index; pollset [index].events |= POLLIN; } void zmq::poll_t::reset_pollin (handle_t handle_) { - int index = fd_table [handle_].index; + fd_t index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLIN); } void zmq::poll_t::set_pollout (handle_t handle_) { - int index = fd_table [handle_].index; + fd_t index = fd_table [handle_].index; pollset [index].events |= POLLOUT; } void zmq::poll_t::reset_pollout (handle_t handle_) { - int index = fd_table [handle_].index; + fd_t index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLOUT); } diff --git a/src/poll.hpp b/src/poll.hpp index bc0466fe..84818055 100644 --- a/src/poll.hpp +++ b/src/poll.hpp @@ -34,7 +34,9 @@ #include "poller.hpp" #if defined ZMQ_USE_POLL +#if !defined ZMQ_HAVE_WINDOWS #include +#endif #include #include diff --git a/src/proxy.cpp b/src/proxy.cpp index df970c73..8c626af8 100644 --- a/src/proxy.cpp +++ b/src/proxy.cpp @@ -37,7 +37,7 @@ // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). -#if defined ZMQ_POLL_BASED_ON_POLL +#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS #include #endif diff --git a/src/signaler.cpp b/src/signaler.cpp index 6c7f9e92..eb84d61c 100644 --- a/src/signaler.cpp +++ b/src/signaler.cpp @@ -35,7 +35,9 @@ // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_POLL_BASED_ON_POLL +#if !defined ZMQ_HAVE_WINDOWS #include +#endif #elif defined ZMQ_POLL_BASED_ON_SELECT #if defined ZMQ_HAVE_WINDOWS #elif defined ZMQ_HAVE_HPUX diff --git a/src/socket_poller.hpp b/src/socket_poller.hpp index 33b24625..04db836f 100644 --- a/src/socket_poller.hpp +++ b/src/socket_poller.hpp @@ -32,7 +32,7 @@ #include "poller.hpp" -#if defined ZMQ_POLL_BASED_ON_POLL +#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS #include #endif diff --git a/src/windows.hpp b/src/windows.hpp index 1100c5a7..c344f90b 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -79,6 +79,10 @@ struct tcp_keepalive { #include #endif +#if ZMQ_USE_POLL +static inline int poll(struct pollfd *pfd, unsigned long nfds, int timeout) { return WSAPoll(pfd, nfds, timeout); } +#endif + // In MinGW environment AI_NUMERICSERV is not defined. #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0x0400 diff --git a/src/zmq.cpp b/src/zmq.cpp index 8396f351..d6f58db1 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -36,7 +36,7 @@ // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). -#if defined ZMQ_POLL_BASED_ON_POLL +#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS #include #endif