Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-02-09 14:30:57 +0300
committerCorinna Vinschen <corinna@vinschen.de>2004-02-09 14:30:57 +0300
commit9ec70d2019470fa084ff009838c93360549fd63f (patch)
treea8c1ea1fea02130069a39b95d4e88a1d0f08b480 /winsup/cygwin/fhandler_socket.cc
parentcec4879206f2158d19eccdf5395b551da7c22cb3 (diff)
* fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index 99e0d18e5..63f28fb27 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -1241,6 +1241,11 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
*(int *) p ? "started" : "cancelled");
set_async (*(int *) p);
break;
+ case FIONREAD:
+ res = ioctlsocket (get_socket (), FIONREAD, (unsigned long *) p);
+ if (res == SOCKET_ERROR)
+ set_winsock_errno ();
+ break;
default:
/* We must cancel WSAAsyncSelect (if any) before setting socket to
* blocking mode