From 5f1eef73121e89a3c5dd576a99bc20a85a411e3b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 14 May 2017 17:35:16 +0200 Subject: [PATCH] stat-time: Adapt for windows-stat-timespec. * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use entire st_ctim field. --- ChangeLog | 6 ++++++ lib/stat-time.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5a1d5c0f9e..39d6735119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-05-14 Bruno Haible + + stat-time: Adapt for windows-stat-timespec. + * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use + entire st_ctim field. + 2017-05-13 Jim Meyering maint.mk: update regex to reflect 2013 addition of "assume" to verify.h diff --git a/lib/stat-time.h b/lib/stat-time.h index 88dcc7f3e0..9e45e85565 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -170,8 +170,12 @@ get_stat_birthtime (struct stat const *st) /* Native Windows platforms (but not Cygwin) put the "file creation time" in st_ctime (!). See . */ +# if _GL_WINDOWS_STAT_TIMESPEC + t = st->st_ctim; +# else t.tv_sec = st->st_ctime; t.tv_nsec = 0; +# endif #else /* Birth time is not supported. */ t.tv_sec = -1; -- 2.39.5