mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.3.605
Problem: MS-Windows: Can't compile with older compilers. (Titov Anatoly) Solution: Add #ifdef for MEMORYSTATUSEX.
This commit is contained in:
@@ -4999,7 +4999,20 @@ mch_breakcheck(void)
|
|||||||
long_u
|
long_u
|
||||||
mch_avail_mem(int special)
|
mch_avail_mem(int special)
|
||||||
{
|
{
|
||||||
if (g_PlatformId != VER_PLATFORM_WIN32_NT)
|
#ifdef MEMORYSTATUSEX
|
||||||
|
PlatformId();
|
||||||
|
if (g_PlatformId == VER_PLATFORM_WIN32_NT)
|
||||||
|
{
|
||||||
|
MEMORYSTATUSEX ms;
|
||||||
|
|
||||||
|
/* Need to use GlobalMemoryStatusEx() when there is more memory than
|
||||||
|
* what fits in 32 bits. But it's not always available. */
|
||||||
|
ms.dwLength = sizeof(MEMORYSTATUSEX);
|
||||||
|
GlobalMemoryStatusEx(&ms);
|
||||||
|
return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
MEMORYSTATUS ms;
|
MEMORYSTATUS ms;
|
||||||
|
|
||||||
@@ -5007,14 +5020,6 @@ mch_avail_mem(int special)
|
|||||||
GlobalMemoryStatus(&ms);
|
GlobalMemoryStatus(&ms);
|
||||||
return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
|
return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MEMORYSTATUSEX ms;
|
|
||||||
|
|
||||||
ms.dwLength = sizeof(MEMORYSTATUSEX);
|
|
||||||
GlobalMemoryStatusEx(&ms);
|
|
||||||
return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
605,
|
||||||
/**/
|
/**/
|
||||||
604,
|
604,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user