changeset 5386:c0e3990aed3f v7.4.044

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.
author Bram Moolenaar <bram@vim.org>
date Sun, 29 Sep 2013 19:05:21 +0200
parents b13c957a4cc7
children 057fb77e28f3
files src/os_mswin.c src/version.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -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
 stat_symlink_aware(const char *name, struct stat *stp)
 {
@@ -533,7 +539,7 @@ stat_symlink_aware(const char *name, str
 	{
 	    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);
 	    _close(fd);
 	    return n;
@@ -580,7 +586,7 @@ wstat_symlink_aware(const WCHAR *name, s
 	{
 	    int	    fd;
 
-	    fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
+	    fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
 	    n = _fstat(fd, stp);
 	    _close(fd);
 	    return n;
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    44,
+/**/
     43,
 /**/
     42,