summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2023-05-18 21:41:25 +0300
committerSlávek Banko <slavek.banko@axis.cz>2023-05-22 20:07:54 +0200
commit4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685 (patch)
tree564b7622f7025d976f0a0ac1cd9ed82ea14239dd /kcontrol
parentbd5494bc81ed0034cde41a34e6a6e8b813b7814b (diff)
downloadtdebase-4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685.tar.gz
tdebase-4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685.zip
SunOS specific patches
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/info/CMakeLists.txt6
-rw-r--r--kcontrol/info/ConfigureChecks.cmake21
-rw-r--r--kcontrol/info/info_solaris.cpp26
3 files changed, 39 insertions, 14 deletions
diff --git a/kcontrol/info/CMakeLists.txt b/kcontrol/info/CMakeLists.txt
index dbedbfe4d..35064b574 100644
--- a/kcontrol/info/CMakeLists.txt
+++ b/kcontrol/info/CMakeLists.txt
@@ -39,10 +39,14 @@ tde_create_translated_desktop(
)
+##### configure checks ##########################
+
+include( ConfigureChecks.cmake )
+
##### kcm_info (module) #########################
tde_add_kpart( kcm_info AUTOMOC
SOURCES main.cpp memory.cpp ${OPENGL_SOURCES}
- LINK tdeui-shared ${GL_LIBRARIES} ${GLU_LIBRARIES}
+ LINK tdeui-shared ${GL_LIBRARIES} ${GLU_LIBRARIES} ${KSTAT_LIBRARIES} ${DEVINFO_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
diff --git a/kcontrol/info/ConfigureChecks.cmake b/kcontrol/info/ConfigureChecks.cmake
new file mode 100644
index 000000000..ec881f0f2
--- /dev/null
+++ b/kcontrol/info/ConfigureChecks.cmake
@@ -0,0 +1,21 @@
+#################################################
+#
+# (C) 2023 DilOS Team
+# denis (AT) tambov (DOT) ru
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+# devinfo
+check_library_exists( devinfo di_init "" HAVE_DEVINFO )
+if( HAVE_DEVINFO )
+ set( DEVINFO_LIBRARIES devinfo )
+else()
+ if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
+ tde_message_fatal( "libdevinfo not found on SunOS platform!" )
+ endif()
+ set( DEVINFO_LIBRARIES "" )
+endif( )
diff --git a/kcontrol/info/info_solaris.cpp b/kcontrol/info/info_solaris.cpp
index 9f2b17e1b..f52927424 100644
--- a/kcontrol/info/info_solaris.cpp
+++ b/kcontrol/info/info_solaris.cpp
@@ -45,9 +45,9 @@ bool GetInfo_CPU( TQListView *lBox ) {
char *ptr;
uint32_t i, ncpus;
unsigned long state_begin;
- QString state;
- QString mhz;
- QString inst;
+ TQString state;
+ TQString mhz;
+ TQString inst;
/*
* get a kstat handle first and update the user's kstat chain
@@ -167,8 +167,8 @@ bool GetInfo_Partitions( TQListView *lBox ) {
struct mnttab mnt;
struct statvfs statbuf;
fsblkcnt_t tmp;
- QString total;
- QString avail;
+ TQString total;
+ TQString avail;
time_t mnttime;
char *timetxt;
char *ptr;
@@ -315,7 +315,7 @@ bool GetInfo_XServer_and_Video( TQListView *lBox ) {
*/
TQListViewItem *mktree( TQListViewItem *top, const char *path ) {
- QListViewItem *parent,
+ TQListViewItem *parent,
*previous,
*result;
char *str = strdup( path ),
@@ -380,7 +380,7 @@ TQListViewItem *mktree( TQListViewItem *top, const char *path ) {
/*
* prop_type_str() -- return the property type as a string
*/
-char *prop_type_str( di_prop_t prop ) {
+const char *prop_type_str( di_prop_t prop ) {
switch( di_prop_type( prop )) {
case DI_PROP_TYPE_UNDEF_IT:
@@ -448,8 +448,8 @@ int prop_type_guess( uchar_t *data, int len ) {
*/
int dump_minor_node( di_node_t node, di_minor_t minor, void *arg ) {
- QListViewItem *item;
- QString majmin;
+ TQListViewItem *item;
+ TQString majmin;
char *type;
dev_t dev;
@@ -466,7 +466,7 @@ int dump_minor_node( di_node_t node, di_minor_t minor, void *arg ) {
(type == NULL) ? "NULL" : type );
if( (dev = di_minor_devt( minor )) != DDI_DEV_T_NONE ) {
- majmin.sprintf( "%ld/%ld", major( dev ), minor( dev ));
+ majmin.sprintf( "%u/%u", major( dev ), minor( dev ));
new TQListViewItem( item, i18n( "Major/Minor:" ), majmin );
}
@@ -562,7 +562,7 @@ TQString propvalue( di_prop_t prop ) {
*/
int dump_node( di_node_t node, void *arg ) {
- QListViewItem *top = (TQListViewItem *) arg,
+ TQListViewItem *top = (TQListViewItem *) arg,
*parent,
*previous;
char *path;
@@ -641,7 +641,7 @@ int dump_node( di_node_t node, void *arg ) {
/*
* property type & value
*/
- QListViewItem *tmp,
+ TQListViewItem *tmp,
*prev;
tmp = new TQListViewItem( previous, di_prop_name( prop ));
tmp->setExpandable( true );
@@ -668,7 +668,7 @@ int dump_node( di_node_t node, void *arg ) {
bool GetInfo_Devices( TQListView *lBox ) {
- QListViewItem *top;
+ TQListViewItem *top;
di_node_t root_node;
/*