Permalink
Browse files

partial revert of r49612, but with a better condition guard,

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 ad6f3e3c641504d0be47a3dc02318bc289f17523
Showing with 17 additions and 0 deletions.
  1. +17 −0 config/gen/platform/win32/sysmem.c
@@ -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)>

0 comments on commit ad6f3e3

Please sign in to comment.