summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorichizok <gclient.gaap@gmail.com>2021-10-15 17:23:12 +0100
committerBram Moolenaar <Bram@vim.org>2021-10-15 17:23:12 +0100
commitdef69dffb3d09a69629b071c89b7893a1783ba53 (patch)
treeba0776953bf7a1f10ac544ceb1318546ede30e58
parenteaa006dae3d5730e3b6dead27905444998b2cf8e (diff)
downloadvim-git-def69dffb3d09a69629b071c89b7893a1783ba53.tar.gz
patch 8.2.3515: nano time test fails on Mac and FreeBSDv8.2.3515
Problem: Nano time test fails on Mac and FreeBSD. Solution: Also check nano time when not on Linux. (Ozaki Kiichi, closes #9000)
-rw-r--r--src/fileio.c19
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 9 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 63d083e15..2f3dc396b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3121,18 +3121,19 @@ msg_add_eol(void)
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!!!
- 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
- ;
+ // 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
- return (long)st->st_mtime != mtime;
+ (long)st->st_mtime != mtime
#endif
+ ;
}
/*
diff --git a/src/version.c b/src/version.c
index f7ebc702b..f7af2d759 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3515,
+/**/
3514,
/**/
3513,