comparison src/configure.ac @ 25953:d7e1cf30728c v8.2.3510

patch 8.2.3510: changes are only detected with one second accuracy Commit: https://github.com/vim/vim/commit/0a7984af5601323fae7b3398f05a48087db7b767 Author: Leah Neukirchen <leah@vuxu.org> Date: Thu Oct 14 21:27:55 2021 +0100 patch 8.2.3510: changes are only detected with one second accuracy Problem: Changes are only detected with one second accuracy. Solution: Use the nanosecond time if possible. (Leah Neukirchen, closes #8873, closes #8875)
author Bram Moolenaar <Bram@vim.org>
date Thu, 14 Oct 2021 22:30:04 +0200
parents 076f9b8e9632
children 13e09dc59f0f
comparison
equal deleted inserted replaced
25952:7eded0585ee0 25953:d7e1cf30728c
3841 ]) 3841 ])
3842 3842
3843 if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then 3843 if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
3844 AC_DEFINE(STAT_IGNORES_SLASH) 3844 AC_DEFINE(STAT_IGNORES_SLASH)
3845 fi 3845 fi
3846
3847 dnl nanoseconds field of struct stat
3848 AC_CACHE_CHECK([for nanoseconds field of struct stat],
3849 ac_cv_struct_st_mtim_nsec,
3850 [ac_save_CPPFLAGS="$CPPFLAGS"
3851 ac_cv_struct_st_mtim_nsec=no
3852 # st_mtim.tv_nsec -- the usual case
3853 # st_mtim._tv_nsec -- Solaris 2.6, if
3854 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
3855 # && !defined __EXTENSIONS__)
3856 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
3857 # st_mtime_n -- AIX 5.2 and above
3858 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
3859 for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do
3860 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
3861 AC_TRY_COMPILE([#include <sys/types.h>
3862 #include <sys/stat.h>], [struct stat s; s.ST_MTIM_NSEC;],
3863 [ac_cv_struct_st_mtim_nsec=$ac_val; break])
3864 done
3865 CPPFLAGS="$ac_save_CPPFLAGS"
3866 ])
3867 if test $ac_cv_struct_st_mtim_nsec != no; then
3868 AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec],
3869 [Define if struct stat contains a nanoseconds field])
3870 fi
3846 3871
3847 dnl Link with iconv for charset translation, if not found without library. 3872 dnl Link with iconv for charset translation, if not found without library.
3848 dnl check for iconv() requires including iconv.h 3873 dnl check for iconv() requires including iconv.h
3849 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it 3874 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it
3850 dnl has been installed. 3875 dnl has been installed.