]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.044 v7.4.044
authorBram Moolenaar <Bram@vim.org>
Sun, 29 Sep 2013 17:05:21 +0000 (19:05 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 29 Sep 2013 17:05:21 +0000 (19:05 +0200)
Problem:    Can't build with old MSVC. (Wang Shoulin)
Solution:   Define OPEN_OH_ARGTYPE instead of using intptr_t directly.

src/os_mswin.c
src/version.c

index 8b507f6fbd0d6e30ad991442e3ef151fbf80949b..95c3d17380333be571ca0b0c8a2d1949cf413911 100644 (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
 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;
 
-           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, struct _stat *stp)
        {
            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;
index 1411943b5afce129496f1e8a066c36dcb7df46b9..52ad91e1d6fdbdd2b2622089fd01e19c82c6951a 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    44,
 /**/
     43,
 /**/