Make wsa_error_to_errno pure function

This commit is contained in:
Martin Hurton
2012-05-27 16:10:19 +02:00
parent a8f9a0d891
commit 13ef1e4f26
5 changed files with 26 additions and 38 deletions

View File

@@ -193,7 +193,7 @@ int zmq::tcp_connecter_t::open ()
s = open_socket (addr->resolved.tcp_addr->family (), SOCK_STREAM, IPPROTO_TCP);
#ifdef ZMQ_HAVE_WINDOWS
if (s == INVALID_SOCKET) {
wsa_error_to_errno ();
errno = wsa_error_to_errno (WSAGetLastError ());
return -1;
}
#else
@@ -226,7 +226,7 @@ int zmq::tcp_connecter_t::open ()
errno = EINPROGRESS;
return -1;
}
wsa_error_to_errno ();
errno = wsa_error_to_errno (WSAGetLastError ());
#else
if (rc == -1 && errno == EINTR) {
errno = EINPROGRESS;