[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111011: Fix incompatibilities wit
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111011: Fix incompatibilities with 64-bit Windows builds. |
Date: |
Sat, 08 Dec 2012 14:06:46 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111011
author: Fabrice Popineau <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sat 2012-12-08 14:06:46 +0200
message:
Fix incompatibilities with 64-bit Windows builds.
src/w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
DWORD_PTR, for compatibility with 64-bit builds.
src/w32.c (_PROCESS_MEMORY_COUNTERS_EX):
(GetProcessWorkingSetSize_Proc, get_process_working_set_size)
(system_process_attributes): Use SIZE_T rather than DWORD, for
compatibility with 64-bit builds.
modified:
src/ChangeLog
src/w32.c
src/w32fns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-12-08 03:16:45 +0000
+++ b/src/ChangeLog 2012-12-08 12:06:46 +0000
@@ -1,3 +1,13 @@
+2012-12-08 Fabrice Popineau <address@hidden>
+
+ * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
+ DWORD_PTR, for compatibility with 64-bit builds.
+
+ * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
+ (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
+ (system_process_attributes): Use SIZE_T rather than DWORD, for
+ compatibility with 64-bit builds.
+
2012-12-08 Christopher Schmidt <address@hidden>
* lread.c (Vload_source_file_function): Doc fix (Bug#11647).
=== modified file 'src/w32.c'
--- a/src/w32.c 2012-11-30 15:14:22 +0000
+++ b/src/w32.c 2012-12-08 12:06:46 +0000
@@ -101,17 +101,17 @@
_WIN32_WINNT than what we use. w32api supplied with MinGW 3.15
defines it in psapi.h */
typedef struct _PROCESS_MEMORY_COUNTERS_EX {
- DWORD cb;
- DWORD PageFaultCount;
- DWORD PeakWorkingSetSize;
- DWORD WorkingSetSize;
- DWORD QuotaPeakPagedPoolUsage;
- DWORD QuotaPagedPoolUsage;
- DWORD QuotaPeakNonPagedPoolUsage;
- DWORD QuotaNonPagedPoolUsage;
- DWORD PagefileUsage;
- DWORD PeakPagefileUsage;
- DWORD PrivateUsage;
+ DWORD cb;
+ DWORD PageFaultCount;
+ SIZE_T PeakWorkingSetSize;
+ SIZE_T WorkingSetSize;
+ SIZE_T QuotaPeakPagedPoolUsage;
+ SIZE_T QuotaPagedPoolUsage;
+ SIZE_T QuotaPeakNonPagedPoolUsage;
+ SIZE_T QuotaNonPagedPoolUsage;
+ SIZE_T PagefileUsage;
+ SIZE_T PeakPagefileUsage;
+ SIZE_T PrivateUsage;
} PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX;
#endif
@@ -351,8 +351,8 @@
DWORD cb);
typedef BOOL (WINAPI * GetProcessWorkingSetSize_Proc) (
HANDLE hProcess,
- DWORD * lpMinimumWorkingSetSize,
- DWORD * lpMaximumWorkingSetSize);
+ PSIZE_T lpMinimumWorkingSetSize,
+ PSIZE_T lpMaximumWorkingSetSize);
typedef BOOL (WINAPI * GlobalMemoryStatus_Proc) (
LPMEMORYSTATUS lpBuffer);
typedef BOOL (WINAPI * GlobalMemoryStatusEx_Proc) (
@@ -4620,8 +4620,8 @@
static BOOL WINAPI
get_process_working_set_size (HANDLE h_proc,
- DWORD *minrss,
- DWORD *maxrss)
+ PSIZE_T minrss,
+ PSIZE_T maxrss)
{
static GetProcessWorkingSetSize_Proc
s_pfn_Get_Process_Working_Set_Size = NULL;
@@ -4866,7 +4866,7 @@
unsigned egid;
PROCESS_MEMORY_COUNTERS mem;
PROCESS_MEMORY_COUNTERS_EX mem_ex;
- DWORD minrss, maxrss;
+ SIZE_T minrss, maxrss;
MEMORYSTATUS memst;
MEMORY_STATUS_EX memstex;
double totphys = 0.0;
@@ -5094,7 +5094,7 @@
&& get_process_memory_info (h_proc, (PROCESS_MEMORY_COUNTERS *)&mem_ex,
sizeof (mem_ex)))
{
- DWORD rss = mem_ex.WorkingSetSize / 1024;
+ SIZE_T rss = mem_ex.WorkingSetSize / 1024;
attrs = Fcons (Fcons (Qmajflt,
make_fixnum_or_float (mem_ex.PageFaultCount)),
@@ -5109,7 +5109,7 @@
else if (h_proc
&& get_process_memory_info (h_proc, &mem, sizeof (mem)))
{
- DWORD rss = mem_ex.WorkingSetSize / 1024;
+ SIZE_T rss = mem_ex.WorkingSetSize / 1024;
attrs = Fcons (Fcons (Qmajflt,
make_fixnum_or_float (mem.PageFaultCount)),
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2012-11-30 15:14:22 +0000
+++ b/src/w32fns.c 2012-12-08 12:06:46 +0000
@@ -7032,7 +7032,7 @@
/* Cache page size, allocation unit, processor type, etc. */
GetSystemInfo (&sysinfo_cache);
- syspage_mask = sysinfo_cache.dwPageSize - 1;
+ syspage_mask = (DWORD_PTR)sysinfo_cache.dwPageSize - 1;
/* Cache os info. */
osinfo_cache.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111011: Fix incompatibilities with 64-bit Windows builds.,
Eli Zaretskii <=