summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-05 12:10:50 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-05 12:10:50 +0200
commitc753478b82613df37b145764e27f5514542edb97 (patch)
tree4740f4bdb60fdec6c2f01039d354c2004cacc27f /src
parent14ddd226daa324831e1872c352452f202fd6068c (diff)
downloadvim-git-c753478b82613df37b145764e27f5514542edb97.tar.gz
patch 8.2.1370: MS-Windows: warning for using fstat() with stat_Tv8.2.1370
Problem: MS-Windows: warning for using fstat() with stat_T. Solution: use _fstat64() if available. (Naruhiko Nishino, closes #6625)
Diffstat (limited to 'src')
-rw-r--r--src/macros.h10
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/macros.h b/src/macros.h
index 7604910a6..7557b2691 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -166,7 +166,15 @@
# ifndef MSWIN
# define mch_access(n, p) access((n), (p))
# endif
-# define mch_fstat(n, p) fstat((n), (p))
+
+// Use 64-bit fstat function if available.
+// NOTE: This condition is the same as for the stat_T type.
+# if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
+# define mch_fstat(n, p) _fstat64((n), (p))
+# else
+# define mch_fstat(n, p) fstat((n), (p))
+# endif
+
# ifdef MSWIN // has its own mch_stat() function
# define mch_stat(n, p) vim_stat((n), (p))
# else
diff --git a/src/version.c b/src/version.c
index a0f4593b2..5246d84c2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1370,
+/**/
1369,
/**/
1368,