summaryrefslogtreecommitdiff
path: root/tar/bsdtar_platform.h
diff options
context:
space:
mode:
authorBjörn Jacke <bjacke@gmail.com>2009-02-05 05:01:52 -0500
committerBjörn Jacke <bjacke@gmail.com>2009-02-05 05:01:52 -0500
commitd831cc4b5b6ca8b8dfcef5f591a7e2336530de3c (patch)
tree8592cc73073b62803829dd49457eb3ca197bf03d /tar/bsdtar_platform.h
parentb09158610fdb15b5bc39bea5bd440d1cfd077778 (diff)
downloadlibarchive-d831cc4b5b6ca8b8dfcef5f591a7e2336530de3c.tar.gz
add support for sub-second resolution timestamps on Tru64 and AIX
SVN-Revision: 552
Diffstat (limited to 'tar/bsdtar_platform.h')
-rw-r--r--tar/bsdtar_platform.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tar/bsdtar_platform.h b/tar/bsdtar_platform.h
index 31dc2587..1a193f65 100644
--- a/tar/bsdtar_platform.h
+++ b/tar/bsdtar_platform.h
@@ -137,15 +137,19 @@
#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
+#elif 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
+#elif HAVE_STRUCT_STAT_ST_MTIME_N
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_ctime_n
+#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_mtime_n
+#elif HAVE_STRUCT_STAT_ST_UMTIME
+#define ARCHIVE_STAT_CTIME_NANOS(st) (st)->st_uctime * 1000
+#define ARCHIVE_STAT_MTIME_NANOS(st) (st)->st_umtime * 1000
#else
#define ARCHIVE_STAT_CTIME_NANOS(st) (0)
#define ARCHIVE_STAT_MTIME_NANOS(st) (0)
#endif
-#endif
/* How to mark functions that don't return. */
/* This facilitates use of some newer static code analysis tools. */