0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

updated for version 7.4.044

Problem:    Can't build with old MSVC. (Wang Shoulin)
Solution:   Define OPEN_OH_ARGTYPE instead of using intptr_t directly.
This commit is contained in:
Bram Moolenaar
2013-09-29 19:05:21 +02:00
parent 386dcde30d
commit 8962fda1da
2 changed files with 10 additions and 2 deletions

View File

@@ -498,6 +498,12 @@ slash_adjust(p)
} }
} }
#if (_MSC_VER >= 1300)
# define OPEN_OH_ARGTYPE intptr_t
#else
# define OPEN_OH_ARGTYPE long
#endif
static int static int
stat_symlink_aware(const char *name, struct stat *stp) stat_symlink_aware(const char *name, struct stat *stp)
{ {
@@ -533,7 +539,7 @@ stat_symlink_aware(const char *name, struct stat *stp)
{ {
int fd, n; int fd, n;
fd = _open_osfhandle((intptr_t)h, _O_RDONLY); fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
n = _fstat(fd, (struct _stat*)stp); n = _fstat(fd, (struct _stat*)stp);
_close(fd); _close(fd);
return n; return n;
@@ -580,7 +586,7 @@ wstat_symlink_aware(const WCHAR *name, struct _stat *stp)
{ {
int fd; int fd;
fd = _open_osfhandle((intptr_t)h, _O_RDONLY); fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
n = _fstat(fd, stp); n = _fstat(fd, stp);
_close(fd); _close(fd);
return n; return n;

View File

@@ -738,6 +738,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 */
/**/
44,
/**/ /**/
43, 43,
/**/ /**/