Re: gnulib support for st_birthtime (second revision of patch)

2007-03-31 Thread Bruno Haible
James Youngman wrote: > > On AIX 5.1, with gnulib as of today (29 March) the test-stat-time test > > fails. > > More precisely, on a 'jfs2' file system, the test fails in the third ASSERT > > of test_mtime. I get these time stamps: > > Does the following patch fix the problem? > > 2007-03-30 Jam

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-29 Thread James Youngman
On 3/29/07, Bruno Haible <[EMAIL PROTECTED]> wrote: On AIX 5.1, with gnulib as of today (29 March) the test-stat-time test fails. More precisely, on a 'jfs2' file system, the test fails in the third ASSERT of test_mtime. I get these time stamps: [...] I can see two ways to fix the test: - Turn

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-29 Thread Bruno Haible
James Youngman wrote: > Sorry about those defects. Thanks for cleaning up the mess :) One more item: On AIX, there is no . 2007-03-29 Bruno Haible <[EMAIL PROTECTED]> * tests/test-stat-time.c: Include , not . *** tests/test-stat-time.c 27 Mar 2007 18:51:18 - 1.3 --- te

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-29 Thread Bruno Haible
On AIX 5.1, with gnulib as of today (29 March) the test-stat-time test fails. More precisely, on a 'jfs2' file system, the test fails in the third ASSERT of test_mtime. I get these time stamps: $ stat t-stt-stamp1 File: `t-stt-stamp1' Size: 0 Blocks: 0 IO Block: 4096 r

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-29 Thread Paul Eggert
"James Youngman" <[EMAIL PROTECTED]> writes: > On 3/27/07, Paul Eggert <[EMAIL PROTECTED]> wrote: >> - /* Birth time not supported. */ >> - pts->tv_sec = 0; >> - pts->tv_nsec = 0; >> - return 0;/* result is not valid */ >> + /* Birth time is not supported. Set tv_sec to

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-28 Thread James Youngman
On 3/27/07, Paul Eggert <[EMAIL PROTECTED]> wrote: - /* Birth time not supported. */ - pts->tv_sec = 0; - pts->tv_nsec = 0; - return 0;/* result is not valid */ + /* Birth time is not supported. Set tv_sec to avoid undefined behavior. */ + t.tv_sec = -1; + t.tv_nsec

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Eric Blake
TIMESPEC (st, st_birthtim); #elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC t.tv_sec = st->st_birthtime; Index: m4/stat-time.m4 === RCS file: /sources/gnulib/gnulib/m4/stat-time.m4,v retrieving revision 1.6 diff -u -r1.6 stat-time.m4 --

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Paul Eggert
AT_TIMESPEC - *pts = STAT_TIMESPEC (st, st_birthtim); -# else +/* Return *ST's birth time, if available; otherwise return a value + with negative tv_nsec. */ +static inline struct timespec +get_stat_birthtime (struct stat const *st) +{ struct timespec t; - pts->tv_sec = st->st_birthti

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Jim Meyering
James Youngman <[EMAIL PROTECTED]> wrote: > 2007-03-27 James Youngman <[EMAIL PROTECTED]> > >* lib/stat-time.h (get_stat_birthtime): New function for > retrieving st_birthtime as provided by UFS2 (hence *BSD). >* m4/stat-time.m4 (gl

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Eric Blake
e4... (cached) no configure: creating ./config.status ... make[4]: Entering directory `/home/eblake/gnulib/testdir14664/build/gltests' PASS: test-stat-time.exe PASS: test-time.exe == All 2 tests passed == ... I need to repeat the test with cygwin 1.5.24, which does n

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Bruno Haible
James Youngman wrote: > this version of the patch was not tested on NetBSD-3.1 with UFS2. Sigh. But now at least you get a ready-to-use package for testing by doing ./gnulib-tool --create-testdir --dir=/tmp/testdir --with-tests stat-time Transfer it to the host machine, "./configure CPPFLAGS=

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread James Youngman
Changed test_birthtime's return value to 'void', since the function falls off without providing a return value, and since the return value is effectively not used. Changed NFILES from 5 to 4, to avoid using uninitialized values. Removed the "1 || " in the test, that disabled the test_birthtime t

Re: gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread Bruno Haible
James Youngman wrote: > Needs testing on everything else, notably including: > Cygwin CVS (i.e. version 1.7 or later) > mingw > Systems completely lacking nanosecond timestamps Thanks for the patch. So it can be tested by everyone easily, I applied the patch, with trivial modific

gnulib support for st_birthtime (second revision of patch)

2007-03-27 Thread James Youngman
Tested on: Linux (ext3) (no st_birthtime support at all) NetBSD-3.1 (UFS1) (st_birthtime support in kernel but not filesystem) NetBSD-3.1 (UFS2) (st_birthtime support both kernel and filesystem) NetBSD-3.1 (msdos) (st_birthtime support in kernel but not in

Re: gnulib support for st_birthtime

2007-03-25 Thread Bruno Haible
James Youngman wrote: > 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. On the contrary, pushing the change into gnulib will make testing easier: If you provide a u

Re: gnulib support for st_birthtime

2007-03-25 Thread James Youngman
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. The

Re: gnulib support for st_birthtime

2007-03-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 3/24/2007 9:17 PM: > James Youngman wrote: >> 2007-03-24 James Youngman <[EMAIL PROTECTED]> >> >> * lib/stat-time.h (get_stat_birthtime): New function for >> retrieving

Re: gnulib support for st_birthtime

2007-03-24 Thread Bruno Haible
James Youngman wrote: > 2007-03-24 James Youngman <[EMAIL PROTECTED]> > > * 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_birtht

gnulib support for st_birthtime

2007-03-24 Thread James Youngman
Apologies if I have something signficant wrong; it's my first nontrivial gnulib patch. 2007-03-24 James Youngman <[EMAIL PROTECTED]> * lib/stat-time.h (get_stat_birthtime): New function for retrieving st_birthtime as provided by UFS2 (hence *BSD). * m4/s

Re: st_birthtime

2007-03-06 Thread James Youngman
On 3/6/07, Paul Eggert <[EMAIL PROTECTED]> wrote: "James Youngman" <[EMAIL PROTECTED]> writes: > I see that FreeBSD and NetBSD support st_birthtime. I'm considering > supporting these in findutils. Is there any interest in suporting > (i.e. maintaining i

Re: st_birthtime

2007-03-05 Thread Paul Eggert
"James Youngman" <[EMAIL PROTECTED]> writes: > I see that FreeBSD and NetBSD support st_birthtime. I'm considering > supporting these in findutils. Is there any interest in suporting > (i.e. maintaining if I contribute a patch) this in stat-time.h? Sure, m

st_birthtime

2007-03-05 Thread James Youngman
I see that FreeBSD and NetBSD support st_birthtime. I'm considering supporting these in findutils. Is there any interest in suporting (i.e. maintaining if I contribute a patch) this in stat-time.h? If there is interest in maintaining the feature, how should we handle systems (like