* times.cc (futimes): Redirect to utimes_worker if given file
descriptor is opened R/O.
This commit is contained in:
parent
835cc311c3
commit
39f7ae0616
@ -1,3 +1,8 @@
|
||||
2005-11-07 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* times.cc (futimes): Redirect to utimes_worker if given file
|
||||
descriptor is opened R/O.
|
||||
|
||||
2005-11-06 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* dcrt0.cc (dll_crt0_0): Initialize security data first so that it can
|
||||
|
@ -513,8 +513,10 @@ futimes (int fd, const struct timeval *tvp)
|
||||
cygheap_fdget cfd (fd);
|
||||
if (cfd < 0)
|
||||
res = -1;
|
||||
else
|
||||
else if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE))
|
||||
res = cfd->utimes (tvp);
|
||||
else
|
||||
res = utimes_worker (cfd->get_win32_name (), tvp, 1);
|
||||
syscall_printf ("%d = futimes (%d, %p)", res, fd, tvp);
|
||||
return res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user