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:
authorChristopher Faylor <me@cgf.cx>2011-07-22 00:21:46 +0400
committerChristopher Faylor <me@cgf.cx>2011-07-22 00:21:46 +0400
commite9b5cc32f7f6fbd46ee06e528085979b5bf1e737 (patch)
treead02cb0caa99327d9945e581a1c3483b1ecf9af0 /winsup/cygwin/fhandler.cc
parent37aeec7f721bd4e1c9ec930d84e130df031d7066 (diff)
Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc: Add #include for asm/socket.h for dealing with FIONREAD. (fhandler_base::ioctl): Special-case errno for FIONREAD. * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Rename parameter for consistency. Call fhandler_base::ioctl to decode default condition. * fhandler_serial.cc (fhandler_serial::ioctl): Ditto. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Call fhandler_base::ioctl to decode default condition. * fhandler_windows.cc (fhandler_windows::ioctl): Ditto.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index b72e03d60..4e1c0a6c1 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -28,6 +28,7 @@ details. */
#include "ntdll.h"
#include "cygtls.h"
#include "sigproc.h"
+#include <asm/socket.h>
#define MAX_OVERLAPPED_WRITE_LEN (64 * 1024 * 1024)
#define MIN_OVERLAPPED_WRITE_LEN (1 * 1024 * 1024)
@@ -1151,6 +1152,10 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
set_nonblocking (*(int *) buf);
res = 0;
break;
+ case FIONREAD:
+ set_errno (ENOTTY);
+ res = -1;
+ break;
default:
set_errno (EINVAL);
res = -1;