diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-05-26 11:11:22 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-05-26 11:11:22 +0000 |
commit | 6852f6c0f624b856be3fe61faa70f471303572be (patch) | |
tree | 57d5bf40cde6331e79b92dec1d31d544a744886a /winsup/cygwin | |
parent | fac297d5f84d06ec41652c42f410f105dd904b67 (diff) | |
download | newlib-6852f6c0f624b856be3fe61faa70f471303572be.zip newlib-6852f6c0f624b856be3fe61faa70f471303572be.tar.gz newlib-6852f6c0f624b856be3fe61faa70f471303572be.tar.bz2 |
* fhandler_socket.cc (fhandler_socket::connect): Guard calls to
sock_event methods by a check for WinSock2 availability.
(fhandler_socket::accept): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6c4d65c..e7634c7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2003-05-26 Corinna Vinschen <corinna@vinschen.de> + * fhandler_socket.cc (fhandler_socket::connect): Guard calls to + sock_event methods by a check for WinSock2 availability. + (fhandler_socket::accept): Ditto. + +2003-05-26 Corinna Vinschen <corinna@vinschen.de> + * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED. (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug. (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug. diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 2e4c5ea..c3c7b9a 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -564,7 +564,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen) if (!get_inet_addr (name, namelen, &sin, &namelen, secret)) return -1; - if (!is_nonblocking () && !is_connect_pending ()) + if (winsock2_active && !is_nonblocking () && !is_connect_pending ()) if (!evt.load (get_socket (), FD_CONNECT_BIT)) { set_winsock_errno (); @@ -573,7 +573,7 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen) res = ::connect (get_socket (), (sockaddr *) &sin, namelen); - if (res && !is_nonblocking () && !is_connect_pending () && + if (winsock2_active && res && !is_nonblocking () && !is_connect_pending () && WSAGetLastError () == WSAEWOULDBLOCK) switch (evt.wait ()) { @@ -684,7 +684,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len) if (len && ((unsigned) *len < sizeof (struct sockaddr_in))) *len = sizeof (struct sockaddr_in); - if (!is_nonblocking ()) + if (winsock2_active && !is_nonblocking ()) { sock_event evt; if (!evt.load (get_socket (), FD_ACCEPT_BIT)) |