Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-03-28 21:49:35 +0400
committerChristopher Faylor <me@cgf.cx>2010-03-28 21:49:35 +0400
commite2402ed859cacf7c56b10963eafda12a155c96d5 (patch)
tree8fe90d1e5cc5ed15452be3be298c2578117cd2b4
parentc019a66c32f8575c85524e4fb889d79093acee56 (diff)
* fhandler.cc (fhandler_base::fstat): Set st_mtime time to current time.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/fhandler.cc3
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 66f84a415..843776494 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2010-03-28 Christopher Faylor <me+cygwin@cgf.cx>
+ * fhandler.cc (fhandler_base::fstat): Set st_mtime time to current time.
+
+2010-03-28 Christopher Faylor <me+cygwin@cgf.cx>
+
* globals.cc (exit_status): Add new ES_EXIT_STARTING enum.
* dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to
calling real exit.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index eec1bd726..847ac78a5 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1100,7 +1100,8 @@ fhandler_base::fstat (struct __stat64 *buf)
buf->st_gid = getegid32 ();
buf->st_nlink = 1;
buf->st_blksize = PREFERRED_IO_BLKSIZE;
- buf->st_ctim.tv_sec = 1164931200L; /* Arbitrary value: 2006-12-01 */
+ buf->st_ctim.tv_sec = time (NULL); /* Arbitrary value: current time,
+ like Linux */
buf->st_ctim.tv_nsec = 0L;
buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
return 0;