diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
commit | 0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch) | |
tree | 3f3789daa2f6db22da6e55e92bee0062a7d613fe /m4/st_tim.m4 | |
parent | Initial commit. (diff) | |
download | dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip |
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/st_tim.m4')
-rw-r--r-- | m4/st_tim.m4 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/m4/st_tim.m4 b/m4/st_tim.m4 new file mode 100644 index 0000000..aa790b6 --- /dev/null +++ b/m4/st_tim.m4 @@ -0,0 +1,41 @@ +AC_DEFUN([DOVECOT_ST_TIM_TIMESPEC], [ + AC_CACHE_CHECK([if struct stat has st_?tim timespec fields],i_cv_have_st_tim_timespec,[ + AC_TRY_COMPILE([ + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> + ], [ + struct stat st; + unsigned long x = st.st_mtim.tv_nsec; + + return 0; + ], [ + i_cv_have_st_tim_timespec=yes + ], [ + i_cv_have_st_tim_timespec=no + ]) + ]) + if test $i_cv_have_st_tim_timespec = yes; then + AC_DEFINE(HAVE_STAT_XTIM,, [Define if you have st_?tim timespec fields in struct stat]) + fi + + AC_CACHE_CHECK([if struct stat has st_?timespec fields],i_cv_have_st_timespec,[ + 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; + ], [ + i_cv_have_st_timespec=yes + ], [ + i_cv_have_st_timespec=no + ]) + ]) + if test $i_cv_have_st_timespec = yes; then + AC_DEFINE(HAVE_STAT_XTIMESPEC,, [Define if you have st_?timespec fields in struct stat]) + fi +]) |