To: vim_dev@googlegroups.com Subject: Patch 8.2.3515 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- 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 ///