dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.044
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.044 (after 7.4.039)
dcaee6
Problem:    Can't build with old MSVC. (Wang Shoulin)
dcaee6
Solution:   Define OPEN_OH_ARGTYPE instead of using intptr_t directly.
dcaee6
Files:	    src/os_mswin.c
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.043/src/os_mswin.c	2013-09-25 19:13:32.000000000 +0200
dcaee6
--- src/os_mswin.c	2013-09-26 20:37:38.000000000 +0200
dcaee6
***************
dcaee6
*** 498,503 ****
dcaee6
--- 498,509 ----
dcaee6
      }
dcaee6
  }
dcaee6
  
dcaee6
+ #if (_MSC_VER >= 1300)
dcaee6
+ # define OPEN_OH_ARGTYPE intptr_t
dcaee6
+ #else
dcaee6
+ # define OPEN_OH_ARGTYPE long
dcaee6
+ #endif
dcaee6
+ 
dcaee6
      static int
dcaee6
  stat_symlink_aware(const char *name, struct stat *stp)
dcaee6
  {
dcaee6
***************
dcaee6
*** 533,539 ****
dcaee6
  	{
dcaee6
  	    int	    fd, n;
dcaee6
  
dcaee6
! 	    fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
dcaee6
  	    n = _fstat(fd, (struct _stat*)stp);
dcaee6
  	    _close(fd);
dcaee6
  	    return n;
dcaee6
--- 539,545 ----
dcaee6
  	{
dcaee6
  	    int	    fd, n;
dcaee6
  
dcaee6
! 	    fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
dcaee6
  	    n = _fstat(fd, (struct _stat*)stp);
dcaee6
  	    _close(fd);
dcaee6
  	    return n;
dcaee6
***************
dcaee6
*** 580,586 ****
dcaee6
  	{
dcaee6
  	    int	    fd;
dcaee6
  
dcaee6
! 	    fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
dcaee6
  	    n = _fstat(fd, stp);
dcaee6
  	    _close(fd);
dcaee6
  	    return n;
dcaee6
--- 586,592 ----
dcaee6
  	{
dcaee6
  	    int	    fd;
dcaee6
  
dcaee6
! 	    fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
dcaee6
  	    n = _fstat(fd, stp);
dcaee6
  	    _close(fd);
dcaee6
  	    return n;
dcaee6
*** ../vim-7.4.043/src/version.c	2013-09-29 16:27:42.000000000 +0200
dcaee6
--- src/version.c	2013-09-29 18:27:58.000000000 +0200
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     44,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
I'd like to meet the man who invented sex and see what he's working on now.
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///