[Cmake-commits] [cmake-commits] hoffman committed SystemInformation.cxx 1.25 1.26
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri May 2 17:22:48 EDT 2008
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv1087
Modified Files:
SystemInformation.cxx
Log Message:
BUG: fix build on vs6
Index: SystemInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemInformation.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** SystemInformation.cxx 2 May 2008 15:44:26 -0000 1.25
--- SystemInformation.cxx 2 May 2008 21:22:46 -0000 1.26
***************
*** 2229,2239 ****
return 0;
#elif _WIN32
MEMORYSTATUSEX ms;
GlobalMemoryStatusEx(&ms);
! unsigned long tv = ms.ullTotalVirtual;
! unsigned long tp = ms.ullTotalPhys;
! unsigned long av = ms.ullAvailVirtual;
! unsigned long ap = ms.ullAvailPhys;
this->TotalVirtualMemory = tv>>10>>10;
this->TotalPhysicalMemory = tp>>10>>10;
--- 2229,2245 ----
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.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;
More information about the Cmake-commits
mailing list