Skip to content

Commit d0acf65

Browse files
committed
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.
1 parent 99331b8 commit d0acf65

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/os_mswin.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,12 @@ slash_adjust(p)
498498
}
499499
}
500500

501+
#if (_MSC_VER >= 1300)
502+
# define OPEN_OH_ARGTYPE intptr_t
503+
#else
504+
# define OPEN_OH_ARGTYPE long
505+
#endif
506+
501507
static int
502508
stat_symlink_aware(const char *name, struct stat *stp)
503509
{
@@ -533,7 +539,7 @@ stat_symlink_aware(const char *name, struct stat *stp)
533539
{
534540
int fd, n;
535541

536-
fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
542+
fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
537543
n = _fstat(fd, (struct _stat*)stp);
538544
_close(fd);
539545
return n;
@@ -580,7 +586,7 @@ wstat_symlink_aware(const WCHAR *name, struct _stat *stp)
580586
{
581587
int fd;
582588

583-
fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
589+
fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
584590
n = _fstat(fd, stp);
585591
_close(fd);
586592
return n;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
44,
741743
/**/
742744
43,
743745
/**/

0 commit comments

Comments
 (0)