From b8e5cf1da0ef8f5e3cc37dd4276fe813f0305182 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 22 Nov 2010 20:09:29 +0200 Subject: [PATCH] Back-port 2010-09-17T21:34:45Z!eliz@gnu.org from the trunk, to resolve bug #7452. w32.c (_PROCESS_MEMORY_COUNTERS_EX): Don't define with versions of w32api >= 3.15. --- src/ChangeLog | 5 +++++ src/w32.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0aa7e869c39..cc7e302d733 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-11-22 Eli Zaretskii + + * w32.c (_PROCESS_MEMORY_COUNTERS_EX): Don't define with versions + of w32api >= 3.15. (Bug#6989) (Bug#7452) + 2010-11-22 YAMAMOTO Mitsuharu * alloc.c (mark_terminals): Ensure that the image cache is marked diff --git a/src/w32.c b/src/w32.c index d96abd346f5..1b01a631850 100644 --- a/src/w32.c +++ b/src/w32.c @@ -94,8 +94,11 @@ typedef struct _MEMORY_STATUS_EX { #include #include +#include +#if !defined(__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15) /* This either is not in psapi.h or guarded by higher value of - _WIN32_WINNT than what we use. */ + _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; @@ -109,6 +112,7 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX { DWORD PeakPagefileUsage; DWORD PrivateUsage; } PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX; +#endif #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */ #include -- 2.39.2