0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.1370: MS-Windows: warning for using fstat() with stat_T

Problem:    MS-Windows: warning for using fstat() with stat_T.
Solution:   use _fstat64() if available. (Naruhiko Nishino, closes #6625)
This commit is contained in:
Bram Moolenaar 2020-08-05 12:10:50 +02:00
parent 14ddd226da
commit c753478b82
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1370,
/**/
1369,
/**/