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 <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,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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202107061816.166IGJLA3135398%40masaka.moolenaar.net.

Raspunde prin e-mail lui