Mercurial > vim
changeset 25155:a37cf57980f9 v8.2.3114
patch 8.2.3114: Amiga-like systems: build error using stat()
Commit: https://github.com/vim/vim/commit/599a6e5b3629d943a795cd69e4d3d19886f86405
Author: =?UTF-8?q?Ola=20S=C3=B6der?= <rolfkopman@gmail.com>
Date: Tue Jul 6 20:15:46 2021 +0200
patch 8.2.3114: Amiga-like systems: build error using stat()
Problem: Amiga-like systems: build error using stat().
Solution: Only build swapfile_process_running() on systems where it is
actually used. (Ola S?der, closes #8519)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 06 Jul 2021 20:30:03 +0200 |
parents | 99d63a6a2e20 |
children | 86c2d209f07b |
files | src/memline.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memline.c +++ b/src/memline.c @@ -1104,6 +1104,7 @@ add_b0_fenc( # include <sys/sysinfo.h> #endif +#if defined(UNIX) || defined(MSWIN) /* * Return TRUE if the process with number "b0p->b0_pid" is still running. * "swap_fname" is the name of the swap file, if it's from before a reboot then @@ -1112,7 +1113,7 @@ add_b0_fenc( static int swapfile_process_running(ZERO_BL *b0p, char_u *swap_fname UNUSED) { -#ifdef HAVE_SYSINFO_UPTIME +# ifdef HAVE_SYSINFO_UPTIME stat_T st; struct sysinfo sinfo; @@ -1121,14 +1122,15 @@ swapfile_process_running(ZERO_BL *b0p, c if (mch_stat((char *)swap_fname, &st) != -1 && sysinfo(&sinfo) == 0 && st.st_mtime < time(NULL) - ( -# ifdef FEAT_EVAL +# ifdef FEAT_EVAL override_sysinfo_uptime >= 0 ? override_sysinfo_uptime : -# endif +# endif sinfo.uptime)) return FALSE; -#endif +# endif return mch_process_running(char_to_long(b0p->b0_pid)); } +#endif /* * Try to recover curbuf from the .swp file.