diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-07-19 11:37:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-07-19 11:37:26 +0200 |
commit | 1a0cee53d414517aef51e31a17a7d089f85e10b8 (patch) | |
tree | a25b07bf57c2ee1580a62d4bc353eabaf17dc44c | |
parent | b5c9cb555ef84d4db5f6feafd49b9ac079615968 (diff) | |
download | vim-git-1a0cee53d414517aef51e31a17a7d089f85e10b8.tar.gz |
updated for version 7.3.605v7.3.605
Problem: MS-Windows: Can't compile with older compilers. (Titov Anatoly)
Solution: Add #ifdef for MEMORYSTATUSEX.
-rw-r--r-- | src/os_win32.c | 23 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index af1232eab..6b29cfc33 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4999,22 +4999,27 @@ mch_breakcheck(void) long_u mch_avail_mem(int special) { - if (g_PlatformId != VER_PLATFORM_WIN32_NT) - { - MEMORYSTATUS ms; - - ms.dwLength = sizeof(MEMORYSTATUS); - GlobalMemoryStatus(&ms); - return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10); - } - else +#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; + + ms.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&ms); + return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10); + } } #ifdef FEAT_MBYTE diff --git a/src/version.c b/src/version.c index 80d8c7547..064af8b2c 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 605, +/**/ 604, /**/ 603, |