diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-25 05:35:21 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-25 05:35:21 +0100 |
commit | 5baac15781779a3ebfa3807299e5329809835370 (patch) | |
tree | 0ea19612d064f02a8bd9fc62df1bef63da276e67 /source3/configure.in | |
parent | c9d193eb08b036c5196d63c22790f3cd3583ba82 (diff) | |
parent | 8b804077128cd981bf238b2506c589dff3bf8ff4 (diff) | |
download | samba-5baac15781779a3ebfa3807299e5329809835370.tar.gz samba-5baac15781779a3ebfa3807299e5329809835370.tar.bz2 samba-5baac15781779a3ebfa3807299e5329809835370.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in index 44a932c6f5..321924889a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -63,6 +63,7 @@ SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TEVENT_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${TDB_CFLAGS}" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/libaddns" SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/librpc" +SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/async_req" SAMBA_CONFIGURE_CPPFLAGS="${SAMBA_CPPFLAGS} -I${srcdir-.}/../lib/popt" @@ -1307,7 +1308,8 @@ fi ################################################# # Check whether struct stat has timestamps with sub-second resolution. -# At least IRIX and Solaris have these. +# At least IRIX and Solaris have these. FREEBSD does as well, +# but with different members # # We check that # all of st_mtim, st_atim and st_ctim exist @@ -1316,6 +1318,43 @@ fi # There is some conflicting standards weirdness about whether we should use # "struct timespec" or "timespec_t". Linux doesn't have timespec_t, so we # prefer struct timespec. +AC_CACHE_CHECK([whether struct stat has timespec timestamps], + samba_cv_stat_timespec_hires, + [ + 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 = s.st_mtimespec; + t = s.st_ctimespec; + t = s.st_atimespec; + ], + samba_cv_stat_timespec_hires=yes, samba_cv_stat_timespec_hires=no) + ]) + +if test x"$samba_cv_stat_timespec_hires" = x"yes" ; then + AC_DEFINE(HAVE_STAT_ST_MTIMESPEC, 1, [whether struct stat contains st_mtimepec]) + AC_DEFINE(HAVE_STAT_ST_ATIMESPEC, 1, [whether struct stat contains st_atimespec]) + AC_DEFINE(HAVE_STAT_ST_CTIMESPEC, 1, [whether struct stat contains st_ctimespec]) + AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, [whether struct stat has sub-second timestamps]) +fi + + AC_CACHE_CHECK([whether struct stat has sub-second timestamps], samba_cv_stat_hires, [ |