mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3515: nano time test fails on Mac and FreeBSD
Problem: Nano time test fails on Mac and FreeBSD. Solution: Also check nano time when not on Linux. (Ozaki Kiichi, closes #9000)
This commit is contained in:
parent
eaa006dae3
commit
def69dffb3
23
src/fileio.c
23
src/fileio.c
@ -3121,18 +3121,19 @@ msg_add_eol(void)
|
|||||||
int
|
int
|
||||||
time_differs(stat_T *st, long mtime, long mtime_ns UNUSED)
|
time_differs(stat_T *st, long mtime, long mtime_ns UNUSED)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) || defined(MSWIN)
|
return
|
||||||
// On a FAT filesystem, esp. under Linux, there are only 5 bits to store
|
#ifdef ST_MTIM_NSEC
|
||||||
// the seconds. Since the roundoff is done when flushing the inode, the
|
(long)st->ST_MTIM_NSEC != mtime_ns ||
|
||||||
// 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
|
#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
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3515,
|
||||||
/**/
|
/**/
|
||||||
3514,
|
3514,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user