Correction of compilation errors
authorbugmaster <bugmaster@opencascade.com>
Fri, 13 Apr 2012 12:34:10 +0000 (16:34 +0400)
committerbugmaster <bugmaster@opencascade.com>
Fri, 13 Apr 2012 12:34:10 +0000 (16:34 +0400)
src/OSD/OSD_MemInfo.cxx

index b493bbd..83cef53 100644 (file)
@@ -65,15 +65,22 @@ void OSD_MemInfo::Update()
 
   // use Psapi library
   HANDLE aProcess = GetCurrentProcess();
+#if (_WIN32_WINNT >= 0x0501)
   PROCESS_MEMORY_COUNTERS_EX aProcMemCnts;
+#else
+  PROCESS_MEMORY_COUNTERS    aProcMemCnts;
+#endif
   if (GetProcessMemoryInfo (aProcess, (PROCESS_MEMORY_COUNTERS* )&aProcMemCnts, sizeof(aProcMemCnts)))
   {
+  #if (_WIN32_WINNT >= 0x0501)
     myCounters[MemPrivate]        = aProcMemCnts.PrivateUsage;
+  #endif
     myCounters[MemWorkingSet]     = aProcMemCnts.WorkingSetSize;
     myCounters[MemWorkingSetPeak] = aProcMemCnts.PeakWorkingSetSize;
     myCounters[MemSwapUsage]      = aProcMemCnts.PagefileUsage;
     myCounters[MemSwapUsagePeak]  = aProcMemCnts.PeakPagefileUsage;
   }
 #elif (defined(__linux__) || defined(__linux))
   // use procfs on Linux
   char aBuff[4096];