summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-05-02 21:22:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-05-02 21:22:46 (GMT)
commit47fa89b6e96a34a7f81edb7bbf4c7f55035093cc (patch)
treeaa5881d345226bedeee5d06efbd1780b18ee8497 /Source
parent9c63132c3c16e9b28c59de811e32288a6bcc7e0a (diff)
downloadCMake-47fa89b6e96a34a7f81edb7bbf4c7f55035093cc.zip
CMake-47fa89b6e96a34a7f81edb7bbf4c7f55035093cc.tar.gz
CMake-47fa89b6e96a34a7f81edb7bbf4c7f55035093cc.tar.bz2
BUG: fix build on vs6
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/SystemInformation.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index e4a4564..5720dff 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -2228,13 +2228,19 @@ int SystemInformationImplementation::QueryMemory()
#ifdef __CYGWIN__
return 0;
#elif _WIN32
+#if _MSC_VER < 1300
+ MEMORYSTATUS ms;
+#define MEM_VAL(value) dw##value
+#else
MEMORYSTATUSEX ms;
+#define MEM_VAL(value) ull##value
+#endif
GlobalMemoryStatusEx(&ms);
- unsigned long tv = ms.ullTotalVirtual;
- unsigned long tp = ms.ullTotalPhys;
- unsigned long av = ms.ullAvailVirtual;
- unsigned long ap = ms.ullAvailPhys;
+ unsigned long tv = ms.MEM_VAL(TotalVirtual);
+ unsigned long tp = ms.MEM_VAL(TotalPhys);
+ unsigned long av = ms.MEM_VAL(AvailVirtual);
+ unsigned long ap = ms.MEM_VAL(AvailPhys);
this->TotalVirtualMemory = tv>>10>>10;
this->TotalPhysicalMemory = tp>>10>>10;
this->AvailableVirtualMemory = av>>10>>10;