Karsten Hopp 0a3b50
To: vim_dev@googlegroups.com
Karsten Hopp 0a3b50
Subject: Patch 7.3.605
Karsten Hopp 0a3b50
Fcc: outbox
Karsten Hopp 0a3b50
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 0a3b50
Mime-Version: 1.0
Karsten Hopp 0a3b50
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 0a3b50
Content-Transfer-Encoding: 8bit
Karsten Hopp 0a3b50
------------
Karsten Hopp 0a3b50
Karsten Hopp 0a3b50
Patch 7.3.605 (after 7.3.577)
Karsten Hopp 0a3b50
Problem:    MS-Windows: Can't compile with older compilers. (Titov Anatoly)
Karsten Hopp 0a3b50
Solution:   Add #ifdef for MEMORYSTATUSEX.
Karsten Hopp 0a3b50
Files:	    src/os_win32.c
Karsten Hopp 0a3b50
Karsten Hopp 0a3b50
Karsten Hopp 0a3b50
*** ../vim-7.3.604/src/os_win32.c	2012-06-29 15:51:26.000000000 +0200
Karsten Hopp 0a3b50
--- src/os_win32.c	2012-07-19 11:35:00.000000000 +0200
Karsten Hopp 0a3b50
***************
Karsten Hopp 0a3b50
*** 4999,5020 ****
Karsten Hopp 0a3b50
      long_u
Karsten Hopp 0a3b50
  mch_avail_mem(int special)
Karsten Hopp 0a3b50
  {
Karsten Hopp 0a3b50
!     if (g_PlatformId != VER_PLATFORM_WIN32_NT)
Karsten Hopp 0a3b50
!     {
Karsten Hopp 0a3b50
! 	MEMORYSTATUS	ms;
Karsten Hopp 0a3b50
! 
Karsten Hopp 0a3b50
! 	ms.dwLength = sizeof(MEMORYSTATUS);
Karsten Hopp 0a3b50
! 	GlobalMemoryStatus(&ms);
Karsten Hopp 0a3b50
! 	return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
Karsten Hopp 0a3b50
!     }
Karsten Hopp 0a3b50
!     else
Karsten Hopp 0a3b50
      {
Karsten Hopp 0a3b50
  	MEMORYSTATUSEX	ms;
Karsten Hopp 0a3b50
  
Karsten Hopp 0a3b50
  	ms.dwLength = sizeof(MEMORYSTATUSEX);
Karsten Hopp 0a3b50
  	GlobalMemoryStatusEx(&ms);
Karsten Hopp 0a3b50
  	return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
Karsten Hopp 0a3b50
      }
Karsten Hopp 0a3b50
  }
Karsten Hopp 0a3b50
  
Karsten Hopp 0a3b50
  #ifdef FEAT_MBYTE
Karsten Hopp 0a3b50
--- 4999,5025 ----
Karsten Hopp 0a3b50
      long_u
Karsten Hopp 0a3b50
  mch_avail_mem(int special)
Karsten Hopp 0a3b50
  {
Karsten Hopp 0a3b50
! #ifdef MEMORYSTATUSEX
Karsten Hopp 0a3b50
!     PlatformId();
Karsten Hopp 0a3b50
!     if (g_PlatformId == VER_PLATFORM_WIN32_NT)
Karsten Hopp 0a3b50
      {
Karsten Hopp 0a3b50
  	MEMORYSTATUSEX	ms;
Karsten Hopp 0a3b50
  
Karsten Hopp 0a3b50
+ 	/* Need to use GlobalMemoryStatusEx() when there is more memory than
Karsten Hopp 0a3b50
+ 	 * what fits in 32 bits. But it's not always available. */
Karsten Hopp 0a3b50
  	ms.dwLength = sizeof(MEMORYSTATUSEX);
Karsten Hopp 0a3b50
  	GlobalMemoryStatusEx(&ms);
Karsten Hopp 0a3b50
  	return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
Karsten Hopp 0a3b50
      }
Karsten Hopp 0a3b50
+     else
Karsten Hopp 0a3b50
+ #endif
Karsten Hopp 0a3b50
+     {
Karsten Hopp 0a3b50
+ 	MEMORYSTATUS	ms;
Karsten Hopp 0a3b50
+ 
Karsten Hopp 0a3b50
+ 	ms.dwLength = sizeof(MEMORYSTATUS);
Karsten Hopp 0a3b50
+ 	GlobalMemoryStatus(&ms);
Karsten Hopp 0a3b50
+ 	return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
Karsten Hopp 0a3b50
+     }
Karsten Hopp 0a3b50
  }
Karsten Hopp 0a3b50
  
Karsten Hopp 0a3b50
  #ifdef FEAT_MBYTE
Karsten Hopp 0a3b50
*** ../vim-7.3.604/src/version.c	2012-07-16 19:27:25.000000000 +0200
Karsten Hopp 0a3b50
--- src/version.c	2012-07-19 11:36:12.000000000 +0200
Karsten Hopp 0a3b50
***************
Karsten Hopp 0a3b50
*** 716,717 ****
Karsten Hopp 0a3b50
--- 716,719 ----
Karsten Hopp 0a3b50
  {   /* Add new patch number below this line */
Karsten Hopp 0a3b50
+ /**/
Karsten Hopp 0a3b50
+     605,
Karsten Hopp 0a3b50
  /**/
Karsten Hopp 0a3b50
Karsten Hopp 0a3b50
-- 
Karsten Hopp 0a3b50
Fingers not found - Pound head on keyboard to continue.
Karsten Hopp 0a3b50
Karsten Hopp 0a3b50
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 0a3b50
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 0a3b50
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 0a3b50
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///