lib/stat-time.h


Log

Author Commit Date CI Message
Paul Eggert fe0f0805 2007-04-03T20:19:02 * lib/stat-time.h: (get_stat_birthtime): Check for zero-valued birthtime on all systems, not just those which use st_birthtimensec rather than st_birthtim. Putting zero in st_bithtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates that the birth time is not available for files on an NFS mount.
Eric Blake 4202d97c 2007-03-27T20:03:47 Support sub-second birthtime on cygwin. * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim. * lib/stat-time.h (STAT_TIMESPEC): Adjust comments. (get_stat_birthtime): Also work with st_birthtim.
Paul Eggert b11bca01 2007-03-27T18:51:17 * lib/stat-time.h (USE_BIRTHTIME): Remove. (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns): (get_stat_birthtime_ns): Do not try to use "spare" fields. (get_stat_birthtime_ns): Simplify compile-time tests. (get_stat_birthtime): Change the API to look like get_stat_mtime etc., except return a negative tv_nsec on error. * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME): Don't check for "spare" fields. (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec or for struct stat.st_birthtime, as these tests aren't used. * tests/test-stat-time.c (test_birthtime): Adjust to new API.
Bruno Haible 735c00a2 2007-03-27T11:01:11 2007-03-27 Bruno Haible <bruno@clisp.org> * lib/stat-time.h: Include <sys/stat.h>. 2007-03-27 James Youngman <jay@gnu.org> * 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 file. * tests/test-stat-time.c: New test, devised by Bruno Haible.
Eric Blake 0e698b54 2007-02-23T18:25:21 * lib/getdate.h (includes): Include <time.h>, not "timespec.h". * lib/stat-time.h (includes): Likewise. * lib/utimecmp.c (includes): Likewise. * lib/utimens.h (includes): Likewise. * lib/getdate.y (includes): Also include "timespec.h" for use internal to the module. * modules/utimens (Depends-on): Revert yesterday's patch. * modules/nanosleep (Depends-on): Add missing dependency.
Paul Eggert 8be31b67 2005-12-07T18:18:33 * m4/stat-time.m4 (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3 porting problem reported by Georg Schwarz in <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>. * m4/stat-time.m4 (gl_STAT_TIME): Add check for TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC.
Paul Eggert 6b788fbe 2005-09-17T06:54:00 (set_stat_atime, set_stat_ctime, set_stat_mtime): Remove; they were buggy in the HAVE_STRUCT_STAT_ST_SPARE1 case, and they were dubious anyway. I rewrote 'tar' to not use them any more.
Paul Eggert 0fecb046 2005-09-16T06:52:14 * MODULES.html.sh (File system functions): Add stat-time. * lib/stat-time.h: New file. * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP): (MTIME_CMP, TIMESPEC_NS): Remove. Now done by stat-time.h, in a different way. (timespec_cmp): New function. * m4/st_mtim.m4: Remove. Superseded by... * m4/stat-time.m4: New file. * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE. Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed. * modules/stat-time: New file. * modules/timespec (Files): Remove m4/st_mtim.m4; this is now done in a different way, by the stat-time module.