forked from aniani/vim
patch 9.1.0842: not checking for the sync() systemcall
Problem: not checking for the sync() systemcall Solution: check for sync in configure script, fix related #ifdefs (Jonas Termansen) It's better to check for features directly rather than maintaining a denylist of operating systems without them. closes: #15985 Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
cef8ab2c75
commit
8bb5eaf019
6
src/auto/configure
vendored
6
src/auto/configure
vendored
@@ -13642,6 +13642,12 @@ then :
|
|||||||
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
|
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
|
||||||
|
if test "x$ac_cv_func_sync" = xyes
|
||||||
|
then :
|
||||||
|
printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -209,6 +209,7 @@
|
|||||||
#undef HAVE_CANBERRA
|
#undef HAVE_CANBERRA
|
||||||
#undef HAVE_SODIUM
|
#undef HAVE_SODIUM
|
||||||
#undef HAVE_ST_BLKSIZE
|
#undef HAVE_ST_BLKSIZE
|
||||||
|
#undef HAVE_SYNC
|
||||||
#undef HAVE_SYSCONF
|
#undef HAVE_SYSCONF
|
||||||
#undef HAVE_SYSCTL
|
#undef HAVE_SYSCTL
|
||||||
#undef HAVE_SYSINFO
|
#undef HAVE_SYSINFO
|
||||||
|
@@ -3769,7 +3769,7 @@ AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
|
|||||||
sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
|
sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
|
||||||
strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
|
strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
|
||||||
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
|
tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
|
||||||
clock_gettime)
|
clock_gettime sync)
|
||||||
AC_FUNC_SELECT_ARGTYPES
|
AC_FUNC_SELECT_ARGTYPES
|
||||||
AC_FUNC_FSEEKO
|
AC_FUNC_FSEEKO
|
||||||
|
|
||||||
|
@@ -594,13 +594,10 @@ mf_sync(memfile_T *mfp, int flags)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
// OpenNT is strictly POSIX (Benzinger)
|
# ifdef HAVE_SYNC
|
||||||
// Tandem/Himalaya NSK-OSS doesn't have sync()
|
|
||||||
// No sync() on Stratus VOS
|
|
||||||
# if defined(__OPENNT) || defined(__TANDEM) || defined(__VOS__)
|
|
||||||
fflush(NULL);
|
|
||||||
# else
|
|
||||||
sync();
|
sync();
|
||||||
|
# else
|
||||||
|
fflush(NULL);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
842,
|
||||||
/**/
|
/**/
|
||||||
841,
|
841,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user