aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-03-03 14:53:37 +0100
committerGitHub <noreply@github.com>2023-03-03 14:53:37 +0100
commit506ffde1a7dd819f2a917907b024f42d32e3ad49 (patch)
tree1a7710fe4e6c27b63737ccb28f8ebc64704100d6 /src/nvim/fileio.c
parent98e051783c26239a47c5cd643e9aea7146b097bd (diff)
parent2cffd048334912f72e0f55b2a02bd1fd9107613a (diff)
downloadrneovim-506ffde1a7dd819f2a917907b024f42d32e3ad49.tar.gz
rneovim-506ffde1a7dd819f2a917907b024f42d32e3ad49.tar.bz2
rneovim-506ffde1a7dd819f2a917907b024f42d32e3ad49.zip
Merge pull request #22442 from bfredl/quickmake
refactor(build): spring cleaning of compile time checks
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 755b8e0834..c93df43cff 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -68,7 +68,7 @@
# include "nvim/charset.h"
#endif
-#if defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+#ifdef HAVE_DIRFD_AND_FLOCK
# include <dirent.h>
# include <sys/file.h>
#endif
@@ -5146,7 +5146,7 @@ void forward_slash(char *fname)
/// Path to Nvim's own temp dir. Ends in a slash.
static char *vim_tempdir = NULL;
-#if defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+#ifdef HAVE_DIRFD_AND_FLOCK
DIR *vim_tempdir_dp = NULL; ///< File descriptor of temp dir
#endif
@@ -5316,7 +5316,7 @@ int delete_recursive(const char *name)
return result;
}
-#if defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+#ifdef HAVE_DIRFD_AND_FLOCK
/// Open temporary directory and take file lock to prevent
/// to be auto-cleaned.
static void vim_opentempdir(void)
@@ -5353,7 +5353,7 @@ void vim_deltempdir(void)
return;
}
-#if defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+#ifdef HAVE_DIRFD_AND_FLOCK
vim_closetempdir();
#endif
// remove the trailing path separator
@@ -5391,7 +5391,7 @@ static bool vim_settempdir(char *tempdir)
vim_FullName(tempdir, buf, MAXPATHL, false);
add_pathsep(buf);
vim_tempdir = xstrdup(buf);
-#if defined(HAVE_FLOCK) && defined(HAVE_DIRFD)
+#ifdef HAVE_DIRFD_AND_FLOCK
vim_opentempdir();
#endif
xfree(buf);