This is the mail archive of the
cygwin
mailing list for the Cygwin project.
[PATCH] ioctl FIONREAD implementation for sockets
- From: Ralf Habacker <ralf dot habacker at freenet dot de>
- To: cygwin at cygwin dot com
- Date: Sun, 8 Feb 2004 15:49:05 +0100
- Subject: [PATCH] ioctl FIONREAD implementation for sockets
Hi,
while porting a kde game (Kbattleship) to cygwin/xfree I recognized that the
ioctl FIONREAD function call wasn't implemented.
The appended minor patch added this support to fhandler_socket.cc
Cheers
Ralf
Changelog
2004-02-08 Ralf Habacker <ralf.habacker@freenet.de>
* fhandler_socket.cc (fhandler_socket::ioctl): Added FIONREAD function call.
--- fhandler_socket.cc.orig 2003-12-07 23:38:00.000000000 +0100
+++ fhandler_socket.cc 2004-02-08 15:38:54.508512000 +0100
@@ -1264,6 +1264,13 @@ fhandler_socket::ioctl (unsigned int cmd
set_nonblocking (*(int *) p);
}
break;
+
+ case FIONREAD:
+ res = ioctlsocket (get_socket (), FIONREAD, (unsigned long *) p);
+ if (res == SOCKET_ERROR)
+ set_winsock_errno ();
+ break;
+
}
syscall_printf ("%d = ioctl_socket (%x, %x)", res, cmd, p);
return res;
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/