To: vim_dev@googlegroups.com Subject: Patch 8.2.3114 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3114 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) Files: src/memline.c *** ../vim-8.2.3113/src/memline.c 2021-06-27 13:03:55.986467776 +0200 --- src/memline.c 2021-07-06 19:41:30.681088759 +0200 *************** *** 1104,1109 **** --- 1104,1110 ---- # include #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,1118 **** static int swapfile_process_running(ZERO_BL *b0p, char_u *swap_fname UNUSED) { ! #ifdef HAVE_SYSINFO_UPTIME stat_T st; struct sysinfo sinfo; --- 1113,1119 ---- static int swapfile_process_running(ZERO_BL *b0p, char_u *swap_fname UNUSED) { ! # ifdef HAVE_SYSINFO_UPTIME stat_T st; struct sysinfo sinfo; *************** *** 1121,1134 **** if (mch_stat((char *)swap_fname, &st) != -1 && sysinfo(&sinfo) == 0 && st.st_mtime < time(NULL) - ( ! # ifdef FEAT_EVAL override_sysinfo_uptime >= 0 ? override_sysinfo_uptime : ! # endif sinfo.uptime)) return FALSE; ! #endif return mch_process_running(char_to_long(b0p->b0_pid)); } /* * Try to recover curbuf from the .swp file. --- 1122,1136 ---- if (mch_stat((char *)swap_fname, &st) != -1 && sysinfo(&sinfo) == 0 && st.st_mtime < time(NULL) - ( ! # ifdef FEAT_EVAL override_sysinfo_uptime >= 0 ? override_sysinfo_uptime : ! # endif sinfo.uptime)) return FALSE; ! # endif return mch_process_running(char_to_long(b0p->b0_pid)); } + #endif /* * Try to recover curbuf from the .swp file. *** ../vim-8.2.3113/src/version.c 2021-07-05 22:22:57.005685230 +0200 --- src/version.c 2021-07-06 19:43:01.480916925 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3114, /**/ -- From "know your smileys": % Bike accident. A bit far-fetched, I suppose; although... o _ _ _ _o /\_ _ \\o (_)\__/o (_) _< \_ _>(_) (_)/<_ \_| \ _|/' \/ (_)>(_) (_) (_) (_) (_)' _\o_ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///