Commit 06140daf authored by Ian Barber's avatar Ian Barber

Merge pull request #261 from mkoppanen/windows-build

Windows build
parents e2485492 1bf4067c
......@@ -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
}
......@@ -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
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment