diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-02-27 16:30:32 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2023-03-03 14:19:46 +0100 |
commit | 166b149d5b473f277c63e64ced03c40df44ac3c9 (patch) | |
tree | af1b66f0a4b0b13ad128d0cef106aef5bfbfc704 /src/nvim/fileio.c | |
parent | fbaf5bde55d42869ed6d9e9fc072110ac9976c66 (diff) | |
download | rneovim-166b149d5b473f277c63e64ced03c40df44ac3c9.tar.gz rneovim-166b149d5b473f277c63e64ced03c40df44ac3c9.tar.bz2 rneovim-166b149d5b473f277c63e64ced03c40df44ac3c9.zip |
refactor(build): remove unused stdlib function and include checks
In addition: merge some checks for the same feature into one
test_compile. This reduces the total number of test compiles
which speeds up the cmake configure stage.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 10 |
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); |