* cygwin.din (futimens): Export.

(utimensat): Export.
	* fhandler.cc (fhandler_base::utimens): Replace fhandler_base::utimes.
	Call utimens_fs.
	* fhandler.h (class fhandler_base): Declare utimens_fs instead of
	utimes_fs, utimens instead of utimes.
	(class fhandler_disk_file): Declare utimens instead of utimes.
	* fhandler_disk_file.cc (fhandler_disk_file::utimens): Replace
	fhandler_disk_file::utimes.
	(fhandler_base::utimens_fs): Replace fhandler_base::utimes_fs.
	Implement tv_nsec handling according to SUSv4.
	* syscalls.cc (utimensat): New function.
	* times.cc (timespec_to_filetime): New function.
	(timeval_to_timespec): New function.
	(utimens_worker): Replace utimes_worker.
	(utimes): Convert timeval to timespec and call utimens_worker.
	(lutimes): Ditto.
	(futimens): Take over implementation from futimes.
	(futimes): Convert timeval to timespec and call futimens.
	* winsup.h (timespec_to_filetime): Declare.
	* include/cygwin/version.h: Bump API minor number.
	* posix.sgml: Add SUSv4 section.  Add futimens and utimensat to it.
This commit is contained in:
Corinna Vinschen
2008-04-24 09:59:54 +00:00
parent 0d02384a48
commit eba32ec829
10 changed files with 143 additions and 26 deletions

View File

@@ -1516,10 +1516,10 @@ fhandler_base::link (const char *newpath)
}
int
fhandler_base::utimes (const struct timeval *tvp)
fhandler_base::utimens (const struct timespec *tvp)
{
if (is_fs_special ())
return utimes_fs (tvp);
return utimens_fs (tvp);
set_errno (EINVAL);
return -1;