summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2009-01-29 21:59:44 +0100
committerJeremy Allison <jra@samba.org>2009-01-29 15:26:13 -0800
commitede173219541fd67db42376bb7979bcf2febcaf0 (patch)
treeaac88957dd3526b5831b8f8b6406034217a7c274 /source3
parenta44649cf98ea8f45537ff9a65be69d621c002505 (diff)
downloadsamba-ede173219541fd67db42376bb7979bcf2febcaf0.tar.gz
samba-ede173219541fd67db42376bb7979bcf2febcaf0.tar.bz2
samba-ede173219541fd67db42376bb7979bcf2febcaf0.zip
add configure check for Tru64 sub-second timestamp resolution
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 87707a2f7f..3ae2c8c9d3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1474,6 +1474,46 @@ if test x"$samba_cv_stat_hires_notimespec_n" = x"yes" ; then
[whether struct stat has sub-second timestamps without struct timespec suffixed _n])
fi
+dnl Tru64 has _micro_second_ resolution:
+AC_CACHE_CHECK([whether struct stat has sub-second timestamps in st_uXtime], samba_cv_stat_hires_uxtime,
+ [
+ AC_TRY_COMPILE(
+ [
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+ ],
+ [
+ struct timespec t;
+ struct stat s = {0};
+ t.tv_sec = s.st_mtime;
+ t.tv_nsec = s.st_umtime * 1000;
+ t.tv_sec = s.st_ctime;
+ t.tv_nsec = s.st_uctime * 1000;
+ t.tv_sec = s.st_atime;
+ t.tv_nsec = s.st_uatime * 1000;
+ ],
+ samba_cv_stat_hires_uxtime=yes, samba_cv_stat_hires_uxtime=no)
+ ])
+
+if test x"$samba_cv_stat_hires_uxtime" = x"yes" ; then
+ AC_DEFINE(HAVE_STAT_ST_UMTIME, 1, [whether struct stat contains st_umtime])
+ AC_DEFINE(HAVE_STAT_ST_UATIME, 1, [whether struct stat contains st_uatime])
+ AC_DEFINE(HAVE_STAT_ST_UCTIME, 1, [whether struct stat contains st_uctime])
+ AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1,
+ [whether struct stat has sub-second timestamps in st_uXtime])
+fi
+
AC_CACHE_CHECK([whether struct stat has st_birthtimespec], samba_cv_stat_st_birthtimespec,
[
AC_TRY_COMPILE(