Patch 8.2.3515
Problem:    Nano time test fails on Mac and FreeBSD.
Solution:   Also check nano time when not on Linux. (Ozaki Kiichi,
            closes #9000)
Files:      src/fileio.c


*** ../vim-8.2.3514/src/fileio.c        2021-10-14 21:27:50.646253845 +0100
--- src/fileio.c        2021-10-15 17:19:06.747865792 +0100
***************
*** 3121,3138 ****
      int
  time_differs(stat_T *st, long mtime, long mtime_ns UNUSED)
  {
  #if defined(__linux__) || defined(MSWIN)
!     // On a FAT filesystem, esp. under Linux, there are only 5 bits to store
!     // the seconds.  Since the roundoff is done when flushing the inode, the
!     // time may change unexpectedly by one second!!!
!     return (long)st->st_mtime - mtime > 1 || mtime - (long)st->st_mtime > 1
! # ifdef ST_MTIM_NSEC
!               || (long)st->ST_MTIM_NSEC != mtime_ns
! # endif
!               ;
  #else
!     return (long)st->st_mtime != mtime;
  #endif
  }
  
  /*
--- 3121,3139 ----
      int
  time_differs(stat_T *st, long mtime, long mtime_ns UNUSED)
  {
+     return
+ #ifdef ST_MTIM_NSEC
+       (long)st->ST_MTIM_NSEC != mtime_ns ||
+ #endif
  #if defined(__linux__) || defined(MSWIN)
!       // On a FAT filesystem, esp. under Linux, there are only 5 bits to store
!       // the seconds.  Since the roundoff is done when flushing the inode, the
!       // time may change unexpectedly by one second!!!
!       (long)st->st_mtime - mtime > 1 || mtime - (long)st->st_mtime > 1
  #else
!       (long)st->st_mtime != mtime
  #endif
+       ;
  }
  
  /*
*** ../vim-8.2.3514/src/version.c       2021-10-15 17:09:45.407279908 +0100
--- src/version.c       2021-10-15 17:22:24.454888372 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3515,
  /**/

-- 
Two sheep in a meadow.  One says "baaah".  The other says "exactly!".

 /// 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/20211015162339.735D2C80054%40moolenaar.net.

Raspunde prin e-mail lui