mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
This commit is contained in:
parent
28194e813e
commit
89256ff149
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user