0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-28 16:15:23 +08:00

Merge pull request #261 from mkoppanen/windows-build

Windows build
This commit is contained in:
Ian Barber 2012-02-17 14:38:02 -08:00
commit 06140daf29
3 changed files with 8 additions and 3 deletions

View File

@ -41,10 +41,12 @@ zmq::address_t::~address_t ()
resolved.tcp_addr = 0;
}
}
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
else if (protocol == "ipc") {
if (resolved.ipc_addr) {
delete resolved.ipc_addr;
resolved.ipc_addr = 0;
}
}
#endif
}

View File

@ -26,8 +26,9 @@
namespace zmq
{
class tcp_address_t;
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
class ipc_address_t;
#endif
struct address_t {
address_t (const std::string &protocol_, const std::string &address_);
@ -39,10 +40,11 @@ namespace zmq
// Protocol specific resolved address
union {
tcp_address_t *tcp_addr;
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
ipc_address_t *ipc_addr;
#endif
} resolved;
};
}
#endif

View File

@ -464,6 +464,7 @@ int zmq::socket_base_t::connect (const char *addr_)
return -1;
}
}
#if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS
else if(protocol == "ipc") {
paddr->resolved.ipc_addr = new (std::nothrow) ipc_address_t ();
zmq_assert (paddr->resolved.ipc_addr);
@ -473,7 +474,7 @@ int zmq::socket_base_t::connect (const char *addr_)
return -1;
}
}
#endif
// Create session.
session_base_t *session = session_base_t::create (io_thread, true, this,
options, paddr);