]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
authorCorinna Vinschen <corinna@vinschen.de>
Sat, 25 Oct 2003 12:32:56 +0000 (12:32 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sat, 25 Oct 2003 12:32:56 +0000 (12:32 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc

index d7006ec446b1a4319e847fd81f543f8d7cc6d26d..7424580aab6320b7db4e430dbf5b7da543e09632 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-25  Brian Ford  <ford@vss.fsi.com>
+
+       * fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
+
 2003-10-24  Thomas Pfaff  <tpfaff@gmx.net>
 
        Rename native_mutex to fast_mutex throughout.
index 79f3e2621429b5d52c971be7e3a866e3786b1378..834ea5fe02b61fcc8c632a464f76f6bf74ff30ff 100644 (file)
@@ -909,13 +909,22 @@ fhandler_base::close ()
 int
 fhandler_base::ioctl (unsigned int cmd, void *buf)
 {
-  if (cmd == FIONBIO)
-    syscall_printf ("ioctl (FIONBIO, %p)", buf);
-  else
-    syscall_printf ("ioctl (%x, %p)", cmd, buf);
+  int res;
 
-  set_errno (EINVAL);
-  return -1;
+  switch (cmd)
+    {
+    case FIONBIO:
+      set_nonblocking (*(int *) buf);
+      res = 0;
+      break;
+    default:
+      set_errno (EINVAL);
+      res = -1;
+      break;
+    }
+
+  syscall_printf ("%d = ioctl (%x, %p)", res, cmd, buf);
+  return res;
 }
 
 int
This page took 0.038293 seconds and 5 git commands to generate.