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