OSDN Git Service

* fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.
authorcorinna <corinna>
Mon, 9 Feb 2004 11:30:56 +0000 (11:30 +0000)
committercorinna <corinna>
Mon, 9 Feb 2004 11:30:56 +0000 (11:30 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_socket.cc

index af1c6d4..7de0793 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-09  Ralf Habacker  <ralf.habacker@freenet.de>
+
+       * fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.
+
 2004-02-08  Christopher Faylor  <cgf@redhat.com>
 
        * debug.h (console_printf): Define for non-debugging condition.
index 99e0d18..63f28fb 100644 (file)
@@ -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