summaryrefslogtreecommitdiffstats
path: root/dilos/core/tdebase/debian/patches/dilos.patch
blob: 66e397b346ab4d2637d2f33a8f4f6cd12c87e2ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
Index: tdebase/ksysguard/ksysguardd/CMakeLists.txt
===================================================================
--- tdebase.orig/ksysguard/ksysguardd/CMakeLists.txt
+++ tdebase/ksysguard/ksysguardd/CMakeLists.txt
@@ -19,6 +19,8 @@ elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Op
   set( OS_SPECIFIC_DIR OpenBSD )
 elseif( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" )
   set( OS_SPECIFIC_DIR FreeBSD )
+elseif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
+  set( OS_SPECIFIC_DIR Solaris )
 elseif( ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" )
   set( OS_SPECIFIC_DIR NetBSD )
 else()
@@ -30,7 +32,7 @@ add_subdirectory( ${OS_SPECIFIC_DIR} )
 
 add_definitions(
   -DKSYSGUARDDRCFILE=\"${SYSCONF_INSTALL_DIR}/ksysguarddrc\"
-  -DOSTYPE_${CMAKE_SYSTEM_NAME}
+  -DOSTYPE_${OS_SPECIFIC_DIR}
 )
 
 
@@ -46,6 +48,6 @@ include_directories(
 tde_add_executable( ksysguardd AUTOMOC
   SOURCES Command.c conf.c ksysguardd.c PWUIDCache.c
   LINK ccont-static ksysguardd-static ${TDE_LIB_DIR}/libtdefakes_nonpic.a
-    ${SENSORS_LIBRARIES}
+    ${SENSORS_LIBRARIES} socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
Index: tdebase/ksysguard/ksysguardd/Solaris/CMakeLists.txt
===================================================================
--- /dev/null
+++ tdebase/ksysguard/ksysguardd/Solaris/CMakeLists.txt
@@ -0,0 +1,29 @@
+#################################################
+#
+#  (C) 2019 DilOS Team
+#  denis (at) dilos (dot) org
+#
+#  Improvements and feedback are welcome
+#
+#  This file is released under GPL >= 2
+#
+#################################################
+
+
+include_directories(
+  ${CMAKE_BINARY_DIR}
+  ${CMAKE_SOURCE_DIR}/ksysguard/CContLib
+  ${CMAKE_SOURCE_DIR}/ksysguard/ksysguardd
+)
+
+add_definitions(
+       -DHAVE_KSTAT
+)
+
+##### ksysguardd (static) #######################
+
+tde_add_library( ksysguardd STATIC
+  SOURCES
+    LoadAvg.c Memory.c NetDev.c ProcessList.c
+  LINK kstat
+)
Index: tdebase/tdm/backend/CMakeLists.txt
===================================================================
--- tdebase.orig/tdm/backend/CMakeLists.txt
+++ tdebase/tdm/backend/CMakeLists.txt
@@ -44,6 +44,6 @@ tde_add_executable( tdm
     process.c protodpy.c reset.c resource.c rpcauth.c
     server.c session.c sessreg.c socket.c streams.c
     util.c xdmauth.c xdmcp.c
-  LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${UTIL_LIBRARY} ${XDMCP_LIBRARIES}
+  LINK socket nsl X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${CRYPT_LIBRARY} ${PAM_LIBRARY} ${XDMCP_LIBRARIES}
   DESTINATION ${BIN_INSTALL_DIR}
 )
Index: tdebase/kcontrol/info/CMakeLists.txt
===================================================================
--- tdebase.orig/kcontrol/info/CMakeLists.txt
+++ tdebase/kcontrol/info/CMakeLists.txt
@@ -41,6 +41,6 @@ install( FILES
 
 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
   DESTINATION ${PLUGIN_INSTALL_DIR}
 )
Index: tdebase/kcontrol/ebrowsing/plugins/localdomain/CMakeLists.txt
===================================================================
--- tdebase.orig/kcontrol/ebrowsing/plugins/localdomain/CMakeLists.txt
+++ tdebase/kcontrol/ebrowsing/plugins/localdomain/CMakeLists.txt
@@ -38,6 +38,6 @@ tde_add_kpart( liblocaldomainurifilter A
 
 tde_add_executable( klocaldomainurifilterhelper
   SOURCES klocaldomainurifilterhelper.c
-  LINK
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
Index: tdebase/kcontrol/nics/nic.cpp
===================================================================
--- tdebase.orig/kcontrol/nics/nic.cpp
+++ tdebase/kcontrol/nics/nic.cpp
@@ -222,7 +222,11 @@ NICList* findNICs()
          result=ioctl(sockfd,SIOCGIFHWADDR,&ifcopy);
          if (result==0)
          {
+#ifdef	__dilos__
+            char *n = ifcopy.ifr_enaddr;
+#else	/* !__dilos__*/
             char *n = &ifcopy.ifr_ifru.ifru_hwaddr.sa_data[0];
+#endif	/* __dilos__ */
             tmp->HWaddr = HWaddr2String(n);
          }
 #elif defined SIOCGENADDR
Index: tdebase/twin/compton-tde/compton.c
===================================================================
--- tdebase.orig/twin/compton-tde/compton.c
+++ tdebase/twin/compton-tde/compton.c
@@ -11,6 +11,9 @@
 
 #include "compton.h"
 #include <ctype.h>
+#ifdef	__dilos__
+#include <math.h>
+#endif	/* __dilos__ */
 
 // === Global constants ===
 
Index: tdebase/cmake/modules/TDEMacros.cmake
===================================================================
--- tdebase.orig/cmake/modules/TDEMacros.cmake
+++ tdebase/cmake/modules/TDEMacros.cmake
@@ -2182,11 +2182,11 @@ macro( tde_setup_architecture_flags )
     set( LINKER_IMMEDIATE_BINDING_FLAGS "" CACHE INTERNAL "" FORCE )
   endif( )
 
-  check_cxx_compiler_flag( -fPIE HAVE_PIE_SUPPORT )
-  if( HAVE_PIE_SUPPORT )
-    set( TDE_PIE_CFLAGS -fPIE )
-    set( TDE_PIE_LDFLAGS -pie )
-  endif( HAVE_PIE_SUPPORT )
+#  check_cxx_compiler_flag( -fPIE HAVE_PIE_SUPPORT )
+#  if( HAVE_PIE_SUPPORT )
+#    set( TDE_PIE_CFLAGS -fPIE )
+#    set( TDE_PIE_LDFLAGS -pie )
+#  endif( HAVE_PIE_SUPPORT )
 endmacro( )
 
 
Index: tdebase/tdeioslave/media/medianotifier/medianotifier.cpp
===================================================================
--- tdebase.orig/tdeioslave/media/medianotifier/medianotifier.cpp
+++ tdebase/tdeioslave/media/medianotifier/medianotifier.cpp
@@ -372,12 +372,20 @@ extern "C"
 
 void MediaNotifier::checkFreeDiskSpace()
 {
+#ifdef	__dilos__
+    struct statvfs sfs;
+#else	/* !__dilos__ */
     struct statfs sfs;
+#endif	/* __dilos__ */
     long total, avail;
     if ( m_freeDialog )
         return;
 
+#ifdef	__dilos__
+    if ( statvfs( TQFile::encodeName( TQDir::homeDirPath() ), &sfs ) == 0 )
+#else	/* !__dilos__ */
     if ( statfs( TQFile::encodeName( TQDir::homeDirPath() ), &sfs ) == 0 )
+#endif	/* __dilos__ */
     {
         total = sfs.f_blocks;
         avail = ( getuid() ? sfs.f_bavail : sfs.f_bfree );
Index: tdebase/kicker/kicker/ui/k_new_mnu.cpp
===================================================================
--- tdebase.orig/kicker/kicker/ui/k_new_mnu.cpp
+++ tdebase/kicker/kicker/ui/k_new_mnu.cpp
@@ -3618,8 +3618,13 @@ void KMenu::updateMedia()
         {
             descr = mountPoint;
             // calc the free/total space
+#ifdef	__dilos__
+            struct statvfs sfs;
+            if ( statvfs( TQFile::encodeName( mountPoint ), &sfs ) == 0 )
+#else	/* !__dilos__ */
             struct statfs sfs;
             if ( statfs( TQFile::encodeName( mountPoint ), &sfs ) == 0 )
+#endif	/* __dilos__ */
             {
                 uint64_t total = ( uint64_t )sfs.f_blocks * sfs.f_bsize;
                 uint64_t avail = ( uint64_t )( getuid() ? sfs.f_bavail : sfs.f_bfree ) * sfs.f_bsize;
Index: tdebase/kicker/extensions/kasbar/kasloaditem.cpp
===================================================================
--- tdebase.orig/kicker/extensions/kasbar/kasloaditem.cpp
+++ tdebase/kicker/extensions/kasbar/kasloaditem.cpp
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 
 #include <config.h>
-#ifdef HAVE_SYS_LOADAVG_H
+#if	defined(HAVE_SYS_LOADAVG_H) || defined(__dilos__)
 #include <sys/loadavg.h> // e.g. Solaris
 #endif
 
Index: tdebase/kdesktop/lockeng.cc
===================================================================
--- tdebase.orig/kdesktop/lockeng.cc
+++ tdebase/kdesktop/lockeng.cc
@@ -14,8 +14,10 @@
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <kstandarddirs.h>
 #include <tdeapplication.h>
@@ -198,6 +200,7 @@ SaverEngine::SaverEngine()
 	delete config;
 	config = NULL;
 
+#ifndef	__dilos__
 	// Initialize SmartCard readers
 	TDEGenericDevice *hwdevice;
 	TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@@ -208,6 +211,7 @@ SaverEngine::SaverEngine()
 		connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
 		cdevice->enableCardMonitoring(true);
 	}
+#endif	/* __dilos__ */
 
 	// Check card login status
 	KUser userinfo;
@@ -262,6 +266,7 @@ void SaverEngine::cardStartupTimeout() {
 
 void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
 	TQString login_name = TQString::null;
+#ifndef	__dilos__
 	X509CertificatePtrList certList = cdevice->cardX509Certificates();
 	if (certList.count() > 0) {
 		KSSLCertificate* card_cert = NULL;
@@ -275,6 +280,7 @@ void SaverEngine::cryptographicCardInser
 		}
 		delete card_cert;
 	}
+#endif	/* __dilos__ */
 
 	if (login_name != "") {
 		KUser user;
Index: tdebase/kdesktop/lock/lockprocess.h
===================================================================
--- tdebase.orig/kdesktop/lock/lockprocess.h
+++ tdebase/kdesktop/lock/lockprocess.h
@@ -12,8 +12,12 @@
 
 #include <ksslcertificate.h>
 
+#ifdef	__dilos__
+typedef	void	TDECryptographicCardDevice;
+#else	/* !__dilos__ */
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <kgreeterplugin.h>
 
@@ -267,7 +271,9 @@ class LockProcess : public TQWidget
 		int m_dialogPrevY;
 
 		bool m_notifyReadyRequested;
+#ifndef	__dilos__
 		TDECryptographicCardDevice* m_loginCardDevice;
+#endif	/* __dilos__ */
 
 		TQWidget* m_maskWidget;
 		Window m_saverRootWindow;
Index: tdebase/kdesktop/lock/lockprocess.cc
===================================================================
--- tdebase.orig/kdesktop/lock/lockprocess.cc
+++ tdebase/kdesktop/lock/lockprocess.cc
@@ -225,7 +225,9 @@ LockProcess::LockProcess()
 	m_dialogPrevX(0),
 	m_dialogPrevY(0),
 	m_notifyReadyRequested(false),
+#ifndef	__dilos__
 	m_loginCardDevice(NULL),
+#endif	/* __dilos__ */
 	m_maskWidget(NULL),
 	m_saverRootWindow(0)
 {
@@ -291,6 +293,7 @@ LockProcess::LockProcess()
 		}
 	}
 
+#ifndef	__dilos__
 	// Initialize SmartCard readers
 	TDEGenericDevice *hwdevice;
 	TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@@ -303,6 +306,7 @@ LockProcess::LockProcess()
 		cdevice->enableCardMonitoring(true);
 		// cdevice->enablePINEntryCallbacks(true);
 	}
+#endif	/* __dilos__ */
 
 #ifdef KEEP_MOUSE_UNGRABBED
 	setEnabled(false);
@@ -2824,6 +2828,7 @@ void LockProcess::processInputPipeComman
 
 void LockProcess::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
 	TQString login_name = TQString::null;
+#ifndef	__dilos__
 	X509CertificatePtrList certList = cdevice->cardX509Certificates();
 	if (certList.count() > 0) {
 		KSSLCertificate* card_cert = NULL;
@@ -2837,12 +2842,15 @@ void LockProcess::cryptographicCardInser
 		}
 		delete card_cert;
 	}
+#endif	/* __dilos__ */
 
 	if (login_name != "") {
 		KUser user;
 		if (login_name == user.loginName()) {
 			// Pass login to the PAM stack...
+#ifndef	__dilos__
 			m_loginCardDevice = cdevice;
+#endif	/* __dilos__ */
 			if (dynamic_cast<SAKDlg*>(currentDialog)) {
 				dynamic_cast<SAKDlg*>(currentDialog)->closeDialogForced();
 				TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin()));
@@ -2864,18 +2872,28 @@ void LockProcess::cryptographicCardRemov
 		passDlg->resetCardLogin();
 	}
 	else {
+#ifndef	__dilos__
 		m_loginCardDevice = NULL;
+#endif	/* __dilos__ */
 		TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort()));
 	}
 }
 
 void LockProcess::signalPassDlgToAttemptCardLogin() {
 	PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog);
-	if (passDlg && m_loginCardDevice) {
+	if (passDlg
+#ifndef	__dilos__
+	 && m_loginCardDevice
+#endif	/* __dilos__ */
+	 ) {
 		passDlg->attemptCardLogin();
 	}
 	else {
-		if (currentDialog && m_loginCardDevice) {
+		if (currentDialog
+#ifndef	__dilos__
+		 && m_loginCardDevice
+#endif	/* __dilos__ */
+		 ) {
 			// Try again later
 			TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin()));
 		}
@@ -2904,6 +2922,7 @@ void LockProcess::cryptographicCardPinRe
 	qryDlg.setUnlockIcon();
 	mForceReject = false;
 	execDialog(&qryDlg);
+#ifndef	__dilos__
 	if (mForceReject == false) {
 		pin_entry = qryDlg.getEntry();
 		cdevice->setProvidedPin(pin_entry);
@@ -2911,10 +2930,15 @@ void LockProcess::cryptographicCardPinRe
 	else {
 		cdevice->setProvidedPin(TQString::null);
 	}
+#endif	/* __dilos__ */
 }
 
 TDECryptographicCardDevice* LockProcess::cryptographicCardDevice() {
+#ifdef	__dilos__
+	return nullptr;
+#else	/* !__dilos__ */
 	return m_loginCardDevice;
+#endif	/* __dilos__ */
 }
 
 void LockProcess::fullyOnline() {
Index: tdebase/kdesktop/lock/lockdlg.cc
===================================================================
--- tdebase.orig/kdesktop/lock/lockdlg.cc
+++ tdebase/kdesktop/lock/lockdlg.cc
@@ -558,6 +558,7 @@ void PasswordDlg::handleVerify()
 				// Check if cryptographic card login is being used
 				if (mCardLoginInProgress) {
 					// Attempt authentication if configured
+#ifndef	__dilos__
 					TDECryptographicCardDevice* cdevice = static_cast<LockProcess*>(parent())->cryptographicCardDevice();
 					if (cdevice) {
 						TQString autoPIN = cdevice->autoPIN();
@@ -566,6 +567,7 @@ void PasswordDlg::handleVerify()
 							TQTimer::singleShot(0, this, SLOT(slotOK()));
 						}
 					}
+#endif	/* __dilos__ */
 					mCardLoginInProgress = false;
 				}
 			}
Index: tdebase/tdesu/tdesud/tdesud.cpp
===================================================================
--- tdebase.orig/tdesu/tdesud/tdesud.cpp
+++ tdebase/tdesu/tdesud/tdesud.cpp
@@ -45,7 +45,7 @@
 #include <pwd.h>
 #include <errno.h>
 
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__dilos__)
 #include <sys/prctl.h>
 #endif
 #include <sys/time.h>
@@ -251,7 +251,7 @@ int create_socket()
 
 int main(int argc, char *argv[])
 {
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__dilos__)
     prctl(PR_SET_DUMPABLE, 0);
 #endif
 
Index: tdebase/tdm/backend/getfd.c
===================================================================
--- tdebase.orig/tdm/backend/getfd.c
+++ tdebase/tdm/backend/getfd.c
@@ -22,7 +22,7 @@ is_a_console(int fd) {
 	char arg;
 
 	arg = 0;
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__dilos__)
 	return arg;
 #else
 	return (ioctl(fd, KDGKBTYPE, &arg) == 0
Index: tdebase/tdm/kfrontend/kgverify.cpp
===================================================================
--- tdebase.orig/tdm/kfrontend/kgverify.cpp
+++ tdebase/tdm/kfrontend/kgverify.cpp
@@ -34,8 +34,10 @@ Foundation, Inc., 51 Franklin Street, Fi
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <tdeapplication.h>
 #include <tdelocale.h>
@@ -665,12 +667,14 @@ KGVerify::handleVerify()
 					inGreeterPlugin = !ndelay;
 
 					if (cardLoginInProgress) {
+#ifndef	__dilos__
 						TQString autoPIN = cardLoginDevice->autoPIN(); 
 						if (autoPIN != TQString::null) {
 							// Initiate login
 							setPassword(autoPIN);
 							accept();
 						}
+#endif	/* __dilos__ */
 						cardLoginInProgress = false;
 					}
 				}
Index: tdebase/tdm/kfrontend/kgreeter.cpp
===================================================================
--- tdebase.orig/tdm/kfrontend/kgreeter.cpp
+++ tdebase/tdm/kfrontend/kgreeter.cpp
@@ -37,8 +37,10 @@ Foundation, Inc., 51 Franklin Street, Fi
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <tdeapplication.h>
 #include <tdelocale.h>
@@ -247,6 +249,7 @@ KGreeter::~KGreeter()
 }
 
 void KGreeter::cryptographicCardWatcherSetup() {
+#ifndef	__dilos__
 	cardLoginUser = TQString::null;
 
 	// Initialize SmartCard readers
@@ -259,6 +262,7 @@ void KGreeter::cryptographicCardWatcherS
 		connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
 		cdevice->enableCardMonitoring(true);
 	}
+#endif	/* __dilos__ */
 }
 
 void KGreeter::done(int r) {
@@ -872,6 +876,7 @@ void KGreeter::cryptographicCardInserted
 #endif
 
 	TQString login_name = TQString::null;
+#ifndef	__dilos__
 	X509CertificatePtrList certList = cdevice->cardX509Certificates();
 	if (certList.count() > 0) {
 		KSSLCertificate* card_cert = NULL;
@@ -885,6 +890,7 @@ void KGreeter::cryptographicCardInserted
 		}
 		delete card_cert;
 	}
+#endif	/* __dilos__ */
 
 	if (login_name != "") {
 		if (verify->cardLoginInProgress) {
Index: tdebase/tdm/kfrontend/sakdlg.cc
===================================================================
--- tdebase.orig/tdm/kfrontend/sakdlg.cc
+++ tdebase/tdm/kfrontend/sakdlg.cc
@@ -12,8 +12,10 @@
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <tdeapplication.h>
 #include <tdelocale.h>
@@ -135,6 +137,7 @@ SAKDlg::SAKDlg(TQWidget *parent)
 	connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
 	mSAKProcess->start();
 
+#ifndef	__dilos__
 	// Initialize SmartCard readers
 	TDEGenericDevice *hwdevice;
 	TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@@ -145,6 +148,7 @@ SAKDlg::SAKDlg(TQWidget *parent)
 		connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
 		cdevice->enableCardMonitoring(true);
 	}
+#endif	/* __dilos__ */
 
 	mControlPipeHandlerThread = new TQEventLoopThread();
 	mControlPipeHandler = new ControlPipeHandlerObject();
@@ -173,6 +177,7 @@ void SAKDlg::processInputPipeCommand(TQS
 
 void SAKDlg::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
 	TQString login_name = TQString::null;
+#ifndef	__dilos__
 	X509CertificatePtrList certList = cdevice->cardX509Certificates();
 	if (certList.count() > 0) {
 		KSSLCertificate* card_cert = NULL;
@@ -186,6 +191,7 @@ void SAKDlg::cryptographicCardInserted(T
 		}
 		delete card_cert;
 	}
+#endif	/* __dilos__ */
 
 	if (login_name != "") {
 		DM dm;
Index: tdebase/tdm/kfrontend/CMakeLists.txt
===================================================================
--- tdebase.orig/tdm/kfrontend/CMakeLists.txt
+++ tdebase/tdm/kfrontend/CMakeLists.txt
@@ -55,7 +55,7 @@ set_property( SOURCE tdm_config.c tdm_gr
 
 tde_add_executable( tdm_config
   SOURCES tdm_config.c
-  LINK
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -100,6 +100,6 @@ tde_add_executable( gentdmconf AUTOMOC
 
 tde_add_executable( tdmctl
   SOURCES tdmctl.c
-  LINK
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
Index: tdebase/kcontrol/nics/CMakeLists.txt
===================================================================
--- tdebase.orig/kcontrol/nics/CMakeLists.txt
+++ tdebase/kcontrol/nics/CMakeLists.txt
@@ -12,7 +12,9 @@
 include( CheckFunctionExists )
 
 check_include_file( "sys/sockio.h" HAVE_SYS_SOCKIO_H )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( getnameinfo HAVE_GETNAMEINFO )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_struct_has_member( "struct sockaddr" sa_len "sys/types.h;sys/socket.h" HAVE_STRUCT_SOCKADDR_SA_LEN )
 
 
Index: tdebase/tdm/cryptocardwatcher/main.cpp
===================================================================
--- tdebase.orig/tdm/cryptocardwatcher/main.cpp
+++ tdebase/tdm/cryptocardwatcher/main.cpp
@@ -41,8 +41,10 @@
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include "watcher.h"
 
@@ -117,6 +119,7 @@ int main(int argc, char *argv[]) {
 	tdeapp.disableAutoDcopRegistration();
 	CardWatcher* watcher = new CardWatcher();
 
+#ifndef	__dilos__
 	// Initialize SmartCard readers
 	TDEGenericDevice *hwdevice;
 	TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@@ -127,6 +130,7 @@ int main(int argc, char *argv[]) {
 		TQObject::connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), watcher, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
 		cdevice->enableCardMonitoring(true);
 	}
+#endif	/* __dilos__ */
 
 	// Start TDE application
 	ret = tdeapp.exec();
Index: tdebase/tdm/cryptocardwatcher/watcher.cc
===================================================================
--- tdebase.orig/tdm/cryptocardwatcher/watcher.cc
+++ tdebase/tdm/cryptocardwatcher/watcher.cc
@@ -21,8 +21,10 @@
 
 #include <ksslcertificate.h>
 
+#ifndef	__dilos__
 #include <tdehardwaredevices.h>
 #include <tdecryptographiccarddevice.h>
+#endif	/* __dilos__ */
 
 #include <dmctl.h>
 #include <kuser.h>
@@ -37,6 +39,7 @@ CardWatcher::~CardWatcher() {
 
 void CardWatcher::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
 	TQString login_name = TQString::null;
+#ifndef	__dilos__
 	X509CertificatePtrList certList = cdevice->cardX509Certificates();
 	if (certList.count() > 0) {
 		KSSLCertificate* card_cert = NULL;
@@ -50,6 +53,7 @@ void CardWatcher::cryptographicCardInser
 		}
 		delete card_cert;
 	}
+#endif	/* __dilos__ */
 
 	if (login_name != "") {
 		// Determine if user already has an active session
Index: tdebase/tdekbdledsync/getfd.c
===================================================================
--- tdebase.orig/tdekbdledsync/getfd.c
+++ tdebase/tdekbdledsync/getfd.c
@@ -4,7 +4,9 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <sys/ioctl.h>
+#ifdef	__linux__
 #include <linux/kd.h>
+#endif	/* __linux__ */
 #include "getfd.h"
 
 /*
@@ -17,11 +19,15 @@
 
 static int
 is_a_console(int fd) {
+#ifdef	__linux__
 	char arg;
 
 	arg = 0;
 	return (ioctl(fd, KDGKBTYPE, &arg) == 0
 		&& ((arg == KB_101) || (arg == KB_84)));
+#else	/* !__linux__ */
+	return (0);
+#endif	/* __linux__ */
 }
 
 static int
Index: tdebase/tdekbdledsync/main.cpp
===================================================================
--- tdebase.orig/tdekbdledsync/main.cpp
+++ tdebase/tdekbdledsync/main.cpp
@@ -30,9 +30,11 @@ License along with tdekbdledsync. If not
 #include <fcntl.h>
 #include <limits.h>
 #include <dirent.h>
+#ifdef	__linux__
 #include <linux/vt.h>
 #include <linux/input.h>
 #include <linux/uinput.h>
+#endif	/* __linux__ */
 #include <sys/file.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -42,7 +44,9 @@ License along with tdekbdledsync. If not
 #include <signal.h>
 #include <stdint.h>
 extern "C" {
+#ifdef	__linux__
 #include <libudev.h>
+#endif	/* __linux__ */
 #include "getfd.h"
 }
 #include <libgen.h>
@@ -64,6 +68,10 @@ using namespace std;
 
 typedef unsigned char byte;
 
+#ifndef	__linux__
+#define	KEY_MAX	0
+#endif	/* __linux__ */
+
 char filename[32];
 char key_bitmask[(KEY_MAX + 7) / 8];
 
@@ -262,11 +270,14 @@ int find_keyboards() {
 
 		fd = open(filename, O_RDWR|O_SYNC);
 		if (fd >= 0) {
+#ifdef	__linux__
 			ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
 
 			// Ensure that we do not detect tsak faked keyboards
 			ioctl (fd, EVIOCGNAME(sizeof(name)), name);
+#endif	/* __linux__ */
 			if (str_ends_with(name, "+tsak") == 0) {
+#ifdef	__linux__
 				struct input_id input_info;
 				ioctl (fd, EVIOCGID, &input_info);
 				if ((input_info.vendor != 0) && (input_info.product != 0)) {
@@ -278,6 +289,7 @@ int find_keyboards() {
 						}
 					}
 				}
+#endif	/* __linux__ */
 			}
 	
 			if (keyboard_fds[keyboard_fd_num] == 0) {
@@ -302,8 +314,10 @@ int main() {
 	int current_keyboard;
 	char name[256] = "Unknown";
 	unsigned int states;
+#ifdef	__linux__
 	struct input_event ev;
 	struct vt_stat vtstat;
+#endif	/* __linux__ */
 	int vt_fd;
 	int x11_vt_num = -1;
 //	XEvent xev;
@@ -364,6 +378,7 @@ int main() {
 	struct udev_monitor *mon;
 	struct timeval tv;
 
+#ifdef	__linux__
 	// Create the udev object
 	udev = udev_new();
 	if (!udev) {
@@ -376,6 +391,7 @@ int main() {
 	mon = udev_monitor_new_from_netlink(udev, "udev");
 	udev_monitor_filter_add_match_subsystem_devtype(mon, "input", NULL);
 	udev_monitor_enable_receiving(mon);
+#endif	/* __linux__ */
 
 	while (1) {
 		// Get masks
@@ -395,12 +411,15 @@ int main() {
 
 			for (current_keyboard=0;current_keyboard<keyboard_fd_num;current_keyboard++) {
 				// Print device name
+#ifdef	__linux__
 				ioctl(keyboard_fds[current_keyboard], EVIOCGNAME (sizeof (name)), name);
+#endif	/* __linux__ */
 				fprintf(stderr, "[tdekbdledsync] Syncing keyboard: (%s)\n", name);
 			}
 
 			while (1) {
 				// Get current active VT
+#ifdef	__linux__
 				if (ioctl(vt_fd, VT_GETSTATE, &vtstat)) {
 					fprintf(stderr, "[tdekbdledsync] Unable to get current VT!\n");
 					releaseLock(lockfd, lockFileName);
@@ -443,7 +462,9 @@ int main() {
 						}
 					}
 				}
-				else {
+				else
+#endif	/* __linux__ */
+				{
 					// Ensure the X server is still alive
 					// If the X server has terminated, this will fail and the program will terminate
 					XSync(display, False);
@@ -452,9 +473,12 @@ int main() {
 				// Check the hotplug monitoring process to see if any keyboards were added or removed
 				fd_set readfds;
 				FD_ZERO(&readfds);
+#ifdef	__linux__
 				FD_SET(udev_monitor_get_fd(mon), &readfds);
+#endif	/* __linux__ */
 				tv.tv_sec = 0;
 				tv.tv_usec = 0;
+#ifdef	__linux__
 				int fdcount = select(udev_monitor_get_fd(mon)+1, &readfds, NULL, NULL, &tv);
 				if (fdcount < 0) {
 					if (errno == EINTR) {
@@ -481,6 +505,7 @@ int main() {
 						}
 					}
 				}
+#endif	/* __linux__ */
 
 				// Poll
 				usleep(250*1000);
@@ -511,7 +536,9 @@ int main() {
 	}
 
 	releaseLock(lockfd, lockFileName);
+#ifdef	__linux__
 	udev_monitor_unref(mon);
 	udev_unref(udev);
+#endif	/* __linux__ */
 	return 0;
 }
Index: tdebase/tdekbdledsync/CMakeLists.txt
===================================================================
--- tdebase.orig/tdekbdledsync/CMakeLists.txt
+++ tdebase/tdekbdledsync/CMakeLists.txt
@@ -23,7 +23,7 @@ link_directories(
 
 tde_add_executable( tdekbdledsync
   SOURCES getfd.c main.cpp
-  LINK udev X11
+  LINK X11
   DESTINATION ${BIN_INSTALL_DIR}
   SETUID
 )
Index: tdebase/CMakeLists.txt
===================================================================
--- tdebase.orig/CMakeLists.txt
+++ tdebase/CMakeLists.txt
@@ -51,7 +51,7 @@ tde_setup_paths( )
 ##### add apidox targets ############
 
 add_custom_target(apidox
-  COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html"
+  COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/tqt3/doc/html"
   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
 
 add_custom_target(install-apidox
Index: tdebase/tdm/config.def
===================================================================
--- tdebase.orig/tdm/config.def
+++ tdebase/tdm/config.def
@@ -42,6 +42,9 @@
 #elif defined(__SVR4)
 # define HALT_CMD	"/usr/sbin/halt"
 # define REBOOT_CMD	"/usr/sbin/reboot"
+#elif defined(__dilos__)
+# define HALT_CMD	"/usr/sbin/poweroff"
+# define REBOOT_CMD	"/usr/sbin/reboot"
 #else
 # define HALT_CMD	"/sbin/poweroff"
 # define REBOOT_CMD	"/sbin/reboot"
@@ -50,6 +53,9 @@
 #if defined(BSD) || defined(__linux__)
 # define DEF_USER_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"
 # define DEF_SYSTEM_PATH "/usr/local/sbin:/usr/local/bin:/opt/trinity/sbin:/usr/sbin:/opt/trinity/bin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
+#elif defined(__dilos__)
+# define DEF_USER_PATH "/usr/bin:/bin"
+# define DEF_SYSTEM_PATH "/usr/bin:/usr/sbin:/sbin"
 #else
 # define DEF_USER_PATH "/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/ucb"
 # define DEF_SYSTEM_PATH "/usr/local/sbin:/usr/local/bin:/opt/trinity/sbin:/usr/sbin:/opt/trinity/bin:/usr/bin:/sbin:/bin:/etc:/usr/ucb"
@@ -63,7 +69,7 @@
 
 #ifdef __linux__
 # define HAVE_VTS
-#elif defined(__sun__)
+#elif defined(__sun__) || defined(__dilos__)
 # define DEF_SERVER_TTY "console"
 #elif defined(_AIX)
 # define DEF_SERVER_TTY "lft0"