aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tar/bsdtar_platform.h
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2005-03-13 18:36:24 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2005-03-13 18:36:24 +0000
commitd14c1502f0fd4c4920dfff9a2474e311bb904d99 (patch)
tree99397f59edd85b96554957b8340ccff96f6b540f /usr.bin/tar/bsdtar_platform.h
parent009cb1684c5dc4bf335dcabd8ae73b0d0b052b2d (diff)
Add --newer-ctime, --newer-mtime, --newer-ctime-than, and --newer-mtime-than
switches to support selecting files by time of modification. Special thanks to: Steven M. Bellovin, Rich $alz, and Jim Berets, authors of the public-domain getdate.y date-parsing code.
Notes
Notes: svn path=/head/; revision=143528
Diffstat (limited to 'usr.bin/tar/bsdtar_platform.h')
-rw-r--r--usr.bin/tar/bsdtar_platform.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index e4728e363a2d..58d9d851c7b1 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -135,11 +135,14 @@
#endif
#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctimespec.tv_nsec
#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtimespec.tv_nsec
#else
#if HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctim.tv_nsec
#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtim.tv_nsec
#else
+#define ARCHIVE_STAT_CTIME_NANOS(st) (0)
#define ARCHIVE_STAT_MTIME_NANOS(st) (0)
#endif
#endif