* fcntl.cc (fcntl64): Detect negative fd as error.
This commit is contained in:
parent
24149e4aa9
commit
e41f43a1a6
|
@ -1,3 +1,7 @@
|
|||
2009-08-21 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* fcntl.cc (fcntl64): Detect negative fd as error.
|
||||
|
||||
2009-08-21 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mmap.cc (mmap64): Allocate fh_disk_file on cygheap. Delete
|
||||
|
|
|
@ -40,7 +40,13 @@ fcntl64 (int fd, int cmd, ...)
|
|||
switch (cmd)
|
||||
{
|
||||
case F_DUPFD:
|
||||
if ((int) arg >= 0)
|
||||
res = dup2 (fd, cygheap_fdnew (((int) arg) - 1));
|
||||
else
|
||||
{
|
||||
set_errno (EINVAL);
|
||||
res = -1;
|
||||
}
|
||||
break;
|
||||
case F_GETLK:
|
||||
case F_SETLK:
|
||||
|
|
Loading…
Reference in New Issue