On 3/25/07, Bruno Haible <[EMAIL PROTECTED]> wrote:
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
OK. That's a useful change (except that the function should return 1
for this case). However, this is a change which I cannot test since I
have no Woe32 system. I will push the change into findutils (instead
of using it indirectly in gnulib) and test it there for a bit.
There's at least one Cygwin user on the findutils mailing list who
might also be able to test this under mingw.
So, please don't apply my previous patch, since it needs this update
(and I will also update my change to support birthtime on Cygwin).
James.