[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib support for st_birthtime
From: |
Bruno Haible |
Subject: |
Re: gnulib support for st_birthtime |
Date: |
Sun, 25 Mar 2007 04:17:25 +0100 |
User-agent: |
KMail/1.5.4 |
James Youngman wrote:
> 2007-03-24 James Youngman <address@hidden>
>
> * lib/stat-time.h (get_stat_birthtime): New function for
> retrieving st_birthtime as provided by UFS2 (hence *BSD).
> * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
> and its variants.
> * /modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
This is Paul's domain; nevertheless I'd like to mention that native Woe32
platforms (mingw, msvc, but not Cygwin) implementation of stat() and
fstat() store the "file creation time" in st_ctime. This is even documented
on msdn.microsoft.com. Therefore you should be able to write
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
static inline int
get_stat_birthtime (struct stat const *st, struct timespec *pts)
{
pts->tv_sec = st->st_ctime;
pts->tv_nsec = 0;
return 0;
}
#else
...
#endif
Bruno