]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.605
- add patches 7.3.619-743
[packages/vim.git] / 7.3.605
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.605
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.605 (after 7.3.577)
11 Problem:    MS-Windows: Can't compile with older compilers. (Titov Anatoly)
12 Solution:   Add #ifdef for MEMORYSTATUSEX.
13 Files:      src/os_win32.c
14
15
16 *** ../vim-7.3.604/src/os_win32.c       2012-06-29 15:51:26.000000000 +0200
17 --- src/os_win32.c      2012-07-19 11:35:00.000000000 +0200
18 ***************
19 *** 4999,5020 ****
20       long_u
21   mch_avail_mem(int special)
22   {
23 !     if (g_PlatformId != VER_PLATFORM_WIN32_NT)
24 !     {
25 !       MEMORYSTATUS    ms;
26
27 !       ms.dwLength = sizeof(MEMORYSTATUS);
28 !       GlobalMemoryStatus(&ms);
29 !       return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
30 !     }
31 !     else
32       {
33         MEMORYSTATUSEX  ms;
34   
35         ms.dwLength = sizeof(MEMORYSTATUSEX);
36         GlobalMemoryStatusEx(&ms);
37         return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
38       }
39   }
40   
41   #ifdef FEAT_MBYTE
42 --- 4999,5025 ----
43       long_u
44   mch_avail_mem(int special)
45   {
46 ! #ifdef MEMORYSTATUSEX
47 !     PlatformId();
48 !     if (g_PlatformId == VER_PLATFORM_WIN32_NT)
49       {
50         MEMORYSTATUSEX  ms;
51   
52 +       /* Need to use GlobalMemoryStatusEx() when there is more memory than
53 +        * what fits in 32 bits. But it's not always available. */
54         ms.dwLength = sizeof(MEMORYSTATUSEX);
55         GlobalMemoryStatusEx(&ms);
56         return (long_u)((ms.ullAvailPhys + ms.ullAvailPageFile) >> 10);
57       }
58 +     else
59 + #endif
60 +     {
61 +       MEMORYSTATUS    ms;
62
63 +       ms.dwLength = sizeof(MEMORYSTATUS);
64 +       GlobalMemoryStatus(&ms);
65 +       return (long_u)((ms.dwAvailPhys + ms.dwAvailPageFile) >> 10);
66 +     }
67   }
68   
69   #ifdef FEAT_MBYTE
70 *** ../vim-7.3.604/src/version.c        2012-07-16 19:27:25.000000000 +0200
71 --- src/version.c       2012-07-19 11:36:12.000000000 +0200
72 ***************
73 *** 716,717 ****
74 --- 716,719 ----
75   {   /* Add new patch number below this line */
76 + /**/
77 +     605,
78   /**/
79
80 -- 
81 Fingers not found - Pound head on keyboard to continue.
82
83  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
84 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
85 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
86  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.103623 seconds and 3 git commands to generate.