[Kst] branches/work/kst/portto4/kst/src

Mike Fenton mike at staikos.net
Fri Dec 14 21:26:47 CET 2007


SVN commit 748568 by fenton:

Update linux define to include MemoryWidget functionality as well as memory checks in DataWizard and DataCollection.


 M  +2 -2      libkst/datacollection.cpp  
 M  +2 -6      libkst/libkst.pro  
 M  +3 -1      libkstapp/datawizard.cpp  
 M  +1 -1      libkstapp/memorywidget.cpp  


--- branches/work/kst/portto4/kst/src/libkst/datacollection.cpp #748567:748568
@@ -30,7 +30,7 @@
 static QMutex bigLock;
 
 void *realloc(void *ptr, size_t size) {
-#ifdef HAVE_LINUX
+#ifdef __linux__
   QMutexLocker ml(&bigLock);
   meminfo();
   unsigned long bFree = S(kb_main_free + kb_main_buffers + kb_main_cached);
@@ -44,7 +44,7 @@
 }
 
 void *malloc(size_t size) {
-#ifdef HAVE_LINUX
+#ifdef __linux__
   QMutexLocker ml(&bigLock);
   meminfo();
   unsigned long bFree = S(kb_main_free + kb_main_buffers + kb_main_cached);
--- branches/work/kst/portto4/kst/src/libkst/libkst.pro #748567:748568
@@ -13,7 +13,6 @@
     tmp \
     $$OUTPUT_DIR/src/libkst/tmp
 
-x11:!macx:PROCPS += sysinfo.c psversion.c
 SOURCES += \
     builtindatasources.cpp \
     builtinprimitives.cpp \
@@ -48,13 +47,10 @@
     string_kst.cpp \
     stringfactory.cpp \
     vector.cpp \
-    vectorfactory.cpp \
-    #  Needs porting, but is unused anyway
-    #timezones.cpp \
-    # $(PROCPS_COPY) \
-    $$PROCPS 
+    vectorfactory.cpp
 
 !win32:SOURCES += stdinsource.cpp
+!macx:!win32:SOURCES += sysinfo.c psversion.c
 
 HEADERS += \
     builtindatasources.h \
--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #748567:748568
@@ -13,6 +13,8 @@
 
 #include <QFileInfo>
 #include <QMessageBox>
+#include <psversion.h>
+#include <sysinfo.h>
 
 #include "colorsequence.h"
 #include "curve.h"
@@ -546,7 +548,7 @@
   // check for sufficient memory
   unsigned long memoryRequested = 0, memoryAvailable = 1024*1024*1024; // 1GB
   unsigned long frames;
-#ifdef HAVE_LINUX
+#ifdef __linux__
   meminfo();
   memoryAvailable = S(kb_main_free + kb_main_buffers + kb_main_cached);
 #endif
--- branches/work/kst/portto4/kst/src/libkstapp/memorywidget.cpp #748567:748568
@@ -30,7 +30,7 @@
 
 
 void MemoryWidget::updateFreeMemory() {
-#ifdef HAVE_LINUX
+#ifdef __linux__
   meminfo();
   unsigned long mi = S(kb_main_free + kb_main_buffers + kb_main_cached);
   setText(tr("%1 MB available").arg(mi / (1024 * 1024)));


More information about the Kst mailing list