[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-224-gc133294
Jeremy Allison
jra at samba.org
Thu Jan 29 23:56:00 GMT 2009
The branch, master has been updated
via c1332943db6630c1dd916040bdbc9f7627ade148 (commit)
via 164fd3cb3398b14fa02f13e5618465678b27ad07 (commit)
via d177015a6d43fcc26a823e52b86850a82261ad4d (commit)
via ede173219541fd67db42376bb7979bcf2febcaf0 (commit)
from d1ab1b6482d7413337b42de83d7de1ae016d33e1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c1332943db6630c1dd916040bdbc9f7627ade148
Merge: 164fd3cb3398b14fa02f13e5618465678b27ad07 d1ab1b6482d7413337b42de83d7de1ae016d33e1
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jan 29 15:31:56 2009 -0800
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
commit 164fd3cb3398b14fa02f13e5618465678b27ad07
Merge: d177015a6d43fcc26a823e52b86850a82261ad4d aeb23872e25fb720140a10ce01a4211d228b6555
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jan 29 15:27:42 2009 -0800
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
commit d177015a6d43fcc26a823e52b86850a82261ad4d
Author: Björn Jacke <bj at sernet.de>
Date: Thu Jan 29 22:59:00 2009 +0100
add Tru64 sub-second resolution timestamp support
commit ede173219541fd67db42376bb7979bcf2febcaf0
Author: Björn Jacke <bj at sernet.de>
Date: Thu Jan 29 21:59:44 2009 +0100
add configure check for Tru64 sub-second timestamp resolution
-----------------------------------------------------------------------
Summary of changes:
source3/configure.in | 40 ++++++++++++++++++++++++++++++++++++++++
source3/lib/time.c | 24 ++++++++++++++++++++++++
2 files changed, 64 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/configure.in b/source3/configure.in
index 87707a2..3ae2c8c 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(
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 682d96c..e2cfe68 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -409,6 +409,11 @@ struct timespec get_atimespec(const SMB_STRUCT_STAT *pst)
ret.tv_sec = pst->st_atime;
ret.tv_nsec = pst->st_atime_n;
return ret;
+#elif defined(HAVE_STAT_ST_UATIME)
+ struct timespec ret;
+ ret.tv_sec = pst->st_atime;
+ ret.tv_nsec = pst->st_uatime * 1000;
+ return ret;
#elif defined(HAVE_STAT_ST_ATIMESPEC)
return pst->st_atimespec;
#else
@@ -431,6 +436,9 @@ void set_atimespec(SMB_STRUCT_STAT *pst, struct timespec ts)
#elif defined(HAVE_STAT_ST_ATIME_N)
pst->st_atime = ts.tv_sec;
pst->st_atime_n = ts.tv_nsec;
+#elif defined(HAVE_STAT_ST_UATIME)
+ pst->st_atime = ts.tv_sec;
+ pst->st_uatime = ts.tv_nsec / 1000;
#elif defined(HAVE_STAT_ST_ATIMESPEC)
pst->st_atimespec = ts;
#else
@@ -461,6 +469,11 @@ struct timespec get_mtimespec(const SMB_STRUCT_STAT *pst)
ret.tv_sec = pst->st_mtime;
ret.tv_nsec = pst->st_mtime_n;
return ret;
+#elif defined(HAVE_STAT_ST_UMTIME)
+ struct timespec ret;
+ ret.tv_sec = pst->st_mtime;
+ ret.tv_nsec = pst->st_umtime * 1000;
+ return ret;
#elif defined(HAVE_STAT_ST_MTIMESPEC)
return pst->st_mtimespec;
#else
@@ -483,6 +496,9 @@ void set_mtimespec(SMB_STRUCT_STAT *pst, struct timespec ts)
#elif defined(HAVE_STAT_ST_MTIME_N)
pst->st_mtime = ts.tv_sec;
pst->st_mtime_n = ts.tv_nsec;
+#elif defined(HAVE_STAT_ST_UMTIME)
+ pst->st_mtime = ts.tv_sec;
+ pst->st_umtime = ts.tv_nsec / 1000;
#elif defined(HAVE_STAT_ST_MTIMESPEC)
pst->st_mtimespec = ts;
#else
@@ -513,6 +529,11 @@ struct timespec get_ctimespec(const SMB_STRUCT_STAT *pst)
ret.tv_sec = pst->st_ctime;
ret.tv_nsec = pst->st_ctime_n;
return ret;
+#elif defined(HAVE_STAT_ST_UCTIME)
+ struct timespec ret;
+ ret.tv_sec = pst->st_ctime;
+ ret.tv_nsec = pst->st_uctime * 1000;
+ return ret;
#elif defined(HAVE_STAT_ST_CTIMESPEC)
return pst->st_ctimespec;
#else
@@ -535,6 +556,9 @@ void set_ctimespec(SMB_STRUCT_STAT *pst, struct timespec ts)
#elif defined(HAVE_STAT_ST_CTIME_N)
pst->st_ctime = ts.tv_sec;
pst->st_ctime_n = ts.tv_nsec;
+#elif defined(HAVE_STAT_ST_UCTIME)
+ pst->st_ctime = ts.tv_sec;
+ pst->st_uctime = ts.tv_nsec / 1000;
#elif defined(HAVE_STAT_ST_CTIMESPEC)
pst->st_ctimespec = ts;
#else
--
Samba Shared Repository
More information about the samba-cvs
mailing list