mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-31 14:39:55 +01:00
Fix compilation with mingw64 using autotools
This commit is contained in:
parent
7b063a067c
commit
9835e18f64
@ -58,6 +58,20 @@ extern "C" {
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
|
// Set target version to Windows Server 2008, Windows Vista or higher.
|
||||||
|
// Windows XP (0x0501) is supported but without client & server socket types.
|
||||||
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0600
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
// Require Windows XP or higher with MinGW for getaddrinfo().
|
||||||
|
#if(_WIN32_WINNT >= 0x0600)
|
||||||
|
#else
|
||||||
|
#undef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0600
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -30,6 +30,10 @@
|
|||||||
#ifndef __ZMQ_FD_HPP_INCLUDED__
|
#ifndef __ZMQ_FD_HPP_INCLUDED__
|
||||||
#define __ZMQ_FD_HPP_INCLUDED__
|
#define __ZMQ_FD_HPP_INCLUDED__
|
||||||
|
|
||||||
|
#if defined _WIN32
|
||||||
|
#include <windows.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace zmq
|
namespace zmq
|
||||||
{
|
{
|
||||||
#ifdef ZMQ_HAVE_WINDOWS
|
#ifdef ZMQ_HAVE_WINDOWS
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) :
|
zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) :
|
||||||
object_t (ctx_, tid_),
|
object_t (ctx_, tid_),
|
||||||
mailbox_handle(NULL),
|
mailbox_handle((poller_t::handle_t)NULL),
|
||||||
sockets (0),
|
sockets (0),
|
||||||
terminating (false)
|
terminating (false)
|
||||||
{
|
{
|
||||||
|
@ -277,7 +277,7 @@ void zmq::select_t::loop ()
|
|||||||
if (family_entries.size () > 1) {
|
if (family_entries.size () > 1) {
|
||||||
rc = WSAWaitForMultipleEvents (4, wsa_events.events, FALSE,
|
rc = WSAWaitForMultipleEvents (4, wsa_events.events, FALSE,
|
||||||
timeout ? timeout : INFINITE, FALSE);
|
timeout ? timeout : INFINITE, FALSE);
|
||||||
wsa_assert (rc != WSA_WAIT_FAILED);
|
wsa_assert (rc != (int)WSA_WAIT_FAILED);
|
||||||
zmq_assert (rc != WSA_WAIT_IO_COMPLETION);
|
zmq_assert (rc != WSA_WAIT_IO_COMPLETION);
|
||||||
|
|
||||||
if (rc == WSA_WAIT_TIMEOUT)
|
if (rc == WSA_WAIT_TIMEOUT)
|
||||||
|
@ -194,7 +194,7 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_, bool
|
|||||||
ctx_terminated (false),
|
ctx_terminated (false),
|
||||||
destroyed (false),
|
destroyed (false),
|
||||||
poller(NULL),
|
poller(NULL),
|
||||||
handle(NULL),
|
handle((poller_t::handle_t)NULL),
|
||||||
last_tsc (0),
|
last_tsc (0),
|
||||||
ticks (0),
|
ticks (0),
|
||||||
rcvmore (false),
|
rcvmore (false),
|
||||||
|
@ -58,7 +58,7 @@ zmq::socks_connecter_t::socks_connecter_t (class io_thread_t *io_thread_,
|
|||||||
proxy_addr (proxy_addr_),
|
proxy_addr (proxy_addr_),
|
||||||
status (unplugged),
|
status (unplugged),
|
||||||
s (retired_fd),
|
s (retired_fd),
|
||||||
handle(NULL),
|
handle((handle_t)NULL),
|
||||||
handle_valid(false),
|
handle_valid(false),
|
||||||
delayed_start (delayed_start_),
|
delayed_start (delayed_start_),
|
||||||
timer_started(false),
|
timer_started(false),
|
||||||
|
@ -61,7 +61,7 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_,
|
|||||||
const std::string &endpoint_) :
|
const std::string &endpoint_) :
|
||||||
s (fd_),
|
s (fd_),
|
||||||
as_server(false),
|
as_server(false),
|
||||||
handle(NULL),
|
handle((handle_t)NULL),
|
||||||
inpos (NULL),
|
inpos (NULL),
|
||||||
insize (0),
|
insize (0),
|
||||||
decoder (NULL),
|
decoder (NULL),
|
||||||
|
@ -64,7 +64,7 @@ zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_,
|
|||||||
io_object_t (io_thread_),
|
io_object_t (io_thread_),
|
||||||
addr (addr_),
|
addr (addr_),
|
||||||
s (retired_fd),
|
s (retired_fd),
|
||||||
handle(NULL),
|
handle((handle_t)NULL),
|
||||||
handle_valid (false),
|
handle_valid (false),
|
||||||
delayed_start (delayed_start_),
|
delayed_start (delayed_start_),
|
||||||
connect_timer_started (false),
|
connect_timer_started (false),
|
||||||
|
@ -62,7 +62,7 @@ zmq::tcp_listener_t::tcp_listener_t (io_thread_t *io_thread_,
|
|||||||
own_t (io_thread_, options_),
|
own_t (io_thread_, options_),
|
||||||
io_object_t (io_thread_),
|
io_object_t (io_thread_),
|
||||||
s (retired_fd),
|
s (retired_fd),
|
||||||
handle(NULL),
|
handle((handle_t)NULL),
|
||||||
socket (socket_)
|
socket (socket_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ zmq::udp_engine_t::udp_engine_t(const options_t &options_) :
|
|||||||
plugged (false),
|
plugged (false),
|
||||||
fd(-1),
|
fd(-1),
|
||||||
session(NULL),
|
session(NULL),
|
||||||
handle(NULL),
|
handle((handle_t)NULL),
|
||||||
address(NULL),
|
address(NULL),
|
||||||
options(options_),
|
options(options_),
|
||||||
send_enabled(false),
|
send_enabled(false),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user