Mercurial > dovecot > core-2.2
diff configure.in @ 7526:a957567706ec HEAD
Replaced HAVE_ST_NSEC macro checks with more generic ST_?TIME_NSEC() macros
for getting the nanosecond and ST_NTIMES_EQUAL() macro for comparing them.
Added support for BSD st_?timespec fields.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 17 May 2008 01:00:22 +0300 |
parents | 3b09af6458e5 |
children | e6187b556b65 |
line wrap: on
line diff
--- a/configure.in Sat May 17 00:40:31 2008 +0300 +++ b/configure.in Sat May 17 01:00:22 2008 +0300 @@ -1218,7 +1218,7 @@ AC_MSG_RESULT(no) ]) -AC_MSG_CHECKING([if struct stat has tv_nsec fields]) +AC_MSG_CHECKING([if struct stat has st_?tim timespec fields]) AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/stat.h> @@ -1229,7 +1229,24 @@ return 0; ], [ - AC_DEFINE(HAVE_STAT_TV_NSEC,, Define if you have tv_nsec fields in struct stat) + AC_DEFINE(HAVE_STAT_XTIM,, Define if you have st_?tim timespec fields in struct stat) + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) +]) + +AC_MSG_CHECKING([if struct stat has st_?timespec fields]) +AC_TRY_COMPILE([ + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> +], [ + struct stat st; + unsigned long x = st.st_mtimespec.tv_nsec; + + return 0; +], [ + AC_DEFINE(HAVE_STAT_XTIMESPEC,, Define if you have st_?timespec fields in struct stat) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no)