Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Ralf Habacker To: cygwin AT cygwin DOT com Subject: [PATCH] ioctl FIONREAD implementation for sockets Date: Sun, 8 Feb 2004 15:49:05 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_hxkJAsxT6ZRWdTB" Message-Id: <200402081549.05934.ralf.habacker@freenet.de> X-IsSubscribed: yes --Boundary-00=_hxkJAsxT6ZRWdTB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 * fhandler_socket.cc (fhandler_socket::ioctl): Added FIONREAD function call. --Boundary-00=_hxkJAsxT6ZRWdTB Content-Type: text/x-diff; charset="us-ascii"; name="cygwin_fhandler_socket_cc-ioctl-fionread.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cygwin_fhandler_socket_cc-ioctl-fionread.patch" --- 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; --Boundary-00=_hxkJAsxT6ZRWdTB Content-Type: text/plain; charset=us-ascii -- 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/ --Boundary-00=_hxkJAsxT6ZRWdTB--