From c4e6ff484c1e6a57304d14ba46852054e98e9158 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 6 Jun 2002 15:35:09 +0000 Subject: * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of st_atim, st_mtim, and st_ctim fields. * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto. * fhandler_process.cc (fhandler_process::fstat): Ditto. * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and st_ctim fields. * syscalls.cc (stat64_to_stat32): Ditto. * times.cc (to_timestruc_t): New function. (time_as_timestruc_t): New function. * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions. * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for all file times, removing the st_spare1, st_spare2, and st_spare3 fields in the process. Add macros to access tv_sec fields by old names. * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct timespec. --- winsup/cygwin/fhandler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index b3fa13c27..1ccc93d7e 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -842,7 +842,8 @@ fhandler_base::fstat (struct __stat64 *buf, path_conv *) buf->st_mode |= get_device () == FH_FLOPPY ? S_IFBLK : S_IFCHR; buf->st_nlink = 1; buf->st_blksize = S_BLKSIZE; - buf->st_atime = buf->st_mtime = buf->st_ctime = time (NULL) - 1; + time_as_timestruc_t (&buf->st_ctim); + buf->st_atim = buf->st_mtim = buf->st_ctim; return 0; } -- cgit v1.2.3