[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib support for st_birthtime (second revision of patch)
From: |
Jim Meyering |
Subject: |
Re: gnulib support for st_birthtime (second revision of patch) |
Date: |
Tue, 27 Mar 2007 17:04:23 +0200 |
James Youngman <address@hidden> wrote:
> 2007-03-27 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.
> * modules/stat-time-test: New test
> * tests/test-stat-time.c: New test, devised by Bruno Haible.
...
> Index: lib/stat-time.h
> ===================================================================
> RCS file: /sources/gnulib/gnulib/lib/stat-time.h,v
> retrieving revision 1.4
> diff -u -p -r1.4 stat-time.h
> --- lib/stat-time.h 23 Feb 2007 18:25:21 -0000 1.4
> +++ lib/stat-time.h 27 Mar 2007 08:06:22 -0000
> @@ -44,6 +44,13 @@
> # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec)
> #endif
>
> +#if defined(HAVE_STRUCT_STAT_ST_BIRTHTIME) ||
> defined(HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) ||
> defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC) ||
> defined(HAVE_STRUCT_STAT_ST_SPARE4)
...
Hi James,
It looks like the test in stat-time.h for whether to enable USE_BIRTHTIME
is too weak. It enables it whenever HAVE_STRUCT_STAT_ST_SPARE4 is
defined, even if there is no st_birthtime member. That fails on HP-UX
systems, because they have st_spare4, but not st_birthtime. Notice
the red columns in the coreutils autobuilder: <http://proulx.com:9000/>.
I suggest you remove the "defined HAVE_STRUCT_STAT_ST_SPARE4" disjunct.
Here's the compiler error:
In file included from utimecmp.c:32:
stat-time.h: In function `get_stat_birthtime':
stat-time.h:181: error: structure has no member named `st_birthtime'
make[2]: *** [utimecmp.o] Error 1
make[2]: Leaving directory
`/usr/local/build/coreutils/hppa-hpux11.11-gcc-coreutils/build/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/usr/local/build/coreutils/hppa-hpux11.11-gcc-coreutils/build/lib'
make: *** [all-recursive] Error 1
Here's the relevant configure output:
checking for struct stat.st_birthtimespec.tv_sec... no
checking for struct stat.st_birthtime... no
checking for struct stat.st_spare4... yes
- Re: gnulib support for st_birthtime (second revision of patch), (continued)
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Eric Blake, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Paul Eggert, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Eric Blake, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), James Youngman, 2007/03/28
- Re: gnulib support for st_birthtime (second revision of patch), Paul Eggert, 2007/03/29
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/29
- Re: gnulib support for st_birthtime (second revision of patch), James Youngman, 2007/03/29
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/31
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/29
Re: gnulib support for st_birthtime (second revision of patch),
Jim Meyering <=