Mercurial > vim
diff src/configure.ac @ 20311:05b4efb062a7 v8.2.0711
patch 8.2.0711: temp directory might be cleared
Commit: https://github.com/vim/vim/commit/b2d0e51366dea6843f991f31a457f5456d162678
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 7 18:37:03 2020 +0200
patch 8.2.0711: temp directory might be cleared
Problem: With a long running Vim the temp directory might be cleared on
some systems.
Solution: Lock the temp directory. (closes #6044)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 07 May 2020 18:45:03 +0200 |
parents | 4470e19bc790 |
children | 4411c2b96af9 |
line wrap: on
line diff
--- a/src/configure.ac +++ b/src/configure.ac @@ -4060,6 +4060,21 @@ AC_TRY_LINK([#include <stdio.h>], [renam AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), AC_MSG_RESULT(no)) +dnl check for dirfd() +AC_MSG_CHECKING(for dirfd) +AC_TRY_COMPILE( +[#include <sys/types.h> +#include <dirent.h>], +[DIR * dir=opendir("dirname"); dirfd(dir);], +AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) + +dnl check for flock() +AC_MSG_CHECKING(for flock) +AC_TRY_COMPILE( +[#include <sys/file.h>], +[flock(10, LOCK_SH);], +AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) + dnl sysctl() may exist but not the arguments we use AC_MSG_CHECKING(for sysctl) AC_TRY_COMPILE(