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