Skip to content

Commit

Permalink
partial revert of r49612, but with a better condition guard,
Browse files Browse the repository at this point in the history
so work with MinGW gcc 3.4.5 & gcc 4.4.3

git-svn-id: https://svn.parrot.org/parrot/trunk@49615 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
fperrad committed Oct 20, 2010
1 parent b513d4c commit ad6f3e3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions config/gen/platform/win32/sysmem.c
Expand Up @@ -23,6 +23,23 @@ Get system memory information.

#include "parrot/sysmem.h"

/* Solution copied from http://www.perlmonks.org/?node_id=749964 */
#if defined __MINGW32__ && __GNUC__ < 4
typedef struct _MEMORYSTATUSEX {
DWORD dwLength;
DWORD dwMemoryLoad;
DWORDLONG ullTotalPhys;
DWORDLONG ullAvailPhys;
DWORDLONG ullTotalPageFile;
DWORDLONG ullAvailPageFile;
DWORDLONG ullTotalVirtual;
DWORDLONG ullAvailVirtual;
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;

WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
#endif

/*
=item C<size_t Parrot_sysmem_amount(PARROT_INTERP)>
Expand Down

0 comments on commit ad6f3e3

Please sign in to comment.