summaryrefslogtreecommitdiffstats
path: root/dilos/tdelibs/debian/patches/dilos.patch
blob: d00b0f3c60520cf3f9c66e72bb1282f29b9312d4 (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
Index: tdelibs/CMakeLists.txt
===================================================================
--- tdelibs.orig/CMakeLists.txt
+++ tdelibs/CMakeLists.txt
@@ -191,7 +191,7 @@ check_include_file( "ctype.h" HAVE_CTYPE
 check_include_file( "dirent.h" HAVE_DIRENT_H )
 check_include_file( "dld.h" HAVE_DLD_H )
 check_include_file( "dlfcn.h" HAVE_DLFCN_H )
-check_include_file( "dl.h" HAVE_DL_H )
+check_include_file( "sys/dl.h" HAVE_DL_H )
 check_include_file( "float.h" HAVE_FLOAT_H )
 check_include_file( "fstab.h" HAVE_FSTAB_H )
 check_include_file( "ieeefp.h" HAVE_IEEEFP_H )
@@ -227,7 +227,9 @@ check_include_file( "sys/dir.h" HAVE_SYS
 check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
 check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
 check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
+tde_save_and_set( CMAKE_REQUIRED_FLAGS "-include stdio.h" )
 check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H )
+tde_restore( CMAKE_REQUIRED_FLAGS )
 check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
 if( NOT HAVE_SYS_MOUNT_H )
   find_path( SYS_MOUNT_PATH "sys/mount.h" )
@@ -250,6 +252,13 @@ if( NOT HAVE_SYS_UCRED_H )
     set( HAVE_SYS_UCRED_H "1" )
   endif( )
 endif( )
+check_include_file( "ucred.h" HAVE_UCRED_H )
+if( NOT HAVE_UCRED_H )
+  find_path( UCRED_PATH "ucred.h" )
+  if( UCRED_PATH )
+    set( HAVE_UCRED_H "1" )
+  endif( )
+endif( )
 check_include_file( "sys/xattr.h" HAVE_SYS_XATTR_H )
 check_include_file( "termios.h" HAVE_TERMIOS_H )
 check_include_file( "termio.h" HAVE_TERMIO_H )
@@ -331,9 +340,11 @@ check_symbol_exists( S_ISSOCK "sys/stat.
 
 check_symbol_exists( gethostbyname2 "netdb.h" HAVE_GETHOSTBYNAME2 )
 check_symbol_exists( gethostbyname2_r "netdb.h" HAVE_GETHOSTBYNAME2_R )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_symbol_exists( gethostbyname_r "netdb.h" HAVE_GETHOSTBYNAME_R )
 check_symbol_exists( gai_strerror "sys/types.h;sys/socket.h;netdb.h" HAVE_GAI_STRERROR )
 check_symbol_exists( getaddrinfo "sys/types.h;sys/socket.h;netdb.h" HAVE_GETADDRINFO )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_symbol_exists( backtrace "execinfo.h" HAVE_BACKTRACE )
 check_cxx_source_compiles( "#include <cxxabi.h>
     int main() { abi::__cxa_demangle(0, 0, 0, 0); return 0; }"
@@ -349,7 +360,7 @@ check_symbol_exists( ffs       "string.h
 check_symbol_exists( asprintf  "stdio.h"  HAVE_ASPRINTF_PROTO )
 check_symbol_exists( vasprintf "stdio.h"  HAVE_VASPRINTF_PROTO )
 check_symbol_exists( snprintf  "stdio.h"  HAVE_SNPRINTF_PROTO )
-check_symbol_exists( vsnprintf "stdarg.h" HAVE_VSNPRINTF_PROTO )
+check_symbol_exists( vsnprintf "stdio.h;stdarg.h" HAVE_VSNPRINTF_PROTO )
 check_symbol_exists( strvercmp "string.h" HAVE_STRVERCMP_PROTO )
 
 
@@ -377,22 +388,32 @@ if( HAVE_GETMNTINFO )
     }"
     GETMNTINFO_USES_STATVFS )
 endif( HAVE_GETMNTINFO )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( getnameinfo HAVE_GETNAMEINFO )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( getpagesize HAVE_GETPAGESIZE )
 check_function_exists( getpeereid HAVE_GETPEEREID )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( getpeername HAVE_GETPEERNAME )
 check_function_exists( getprotobyname_r HAVE_GETPROTOBYNAME_R )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( getpt HAVE_GETPT )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( getservbyname_r HAVE_GETSERVBYNAME_R )
 check_function_exists( getservbyport_r HAVE_GETSERVBYPORT_R )
 check_function_exists( getsockname HAVE_GETSOCKNAME )
 check_function_exists( getsockopt HAVE_GETSOCKOPT )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( gettimeofday HAVE_GETTIMEOFDAY )
 check_function_exists( grantpt HAVE_GRANTPT )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( if_nametoindex HAVE_IF_NAMETOINDEX )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( index HAVE_INDEX)
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( inet_ntop HAVE_INET_NTOP )
 check_function_exists( inet_pton HAVE_INET_PTON )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( setfsent HAVE_SETFSENT )
 check_function_exists( setgroups HAVE_SETGROUPS )
 check_function_exists( setlocale HAVE_SETLOCALE )
@@ -398,9 +419,13 @@ check_function_exists( setpriority HAVE_
 check_function_exists( setlocale HAVE_SETLOCALE )
 check_function_exists( setmntent HAVE_SETMNTENT )
 check_function_exists( setpriority HAVE_SETPRIORITY )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( freeaddrinfo HAVE_FREEADDRINFO )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( strtoll HAVE_STRTOLL )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES socket nsl )
 check_function_exists( socket HAVE_SOCKET )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( strfmon HAVE_STRFMON )
 check_function_exists( stpcpy HAVE_STPCPY )
 check_function_exists( readdir_r HAVE_READDIR_R )
@@ -416,7 +419,9 @@ check_function_exists( _getpty HAVE__GET
 check_function_exists( __argz_count HAVE___ARGZ_COUNT )
 check_function_exists( __argz_next HAVE___ARGZ_NEXT )
 check_function_exists( __argz_stringify HAVE___ARGZ_STRINGIFY )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES sendfile socket nsl)
 check_function_exists( sendfile HAVE_SENDFILE )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
 check_function_exists( rindex HAVE_RINDEX )
 check_function_exists( putenv HAVE_PUTENV )
 check_function_exists( poll HAVE_POLL )
Index: tdelibs/dcop/CMakeLists.txt
===================================================================
--- tdelibs.orig/dcop/CMakeLists.txt
+++ tdelibs/dcop/CMakeLists.txt
@@ -49,7 +49,7 @@ set( ${target}_SRCS
 tde_add_library( ${target} SHARED AUTOMOC
   SOURCES ${${target}_SRCS}
   VERSION 14.0.0
-  LINK kICE-static ${TQT_LIBRARIES}
+  LINK kICE-static ${TQT_LIBRARIES} socket nsl
   DESTINATION ${LIB_INSTALL_DIR}
 )
 
Index: tdelibs/tdecore/network/kresolver_p.h
===================================================================
--- tdelibs.orig/tdecore/network/kresolver_p.h
+++ tdelibs/tdecore/network/kresolver_p.h
@@ -48,7 +48,7 @@ extern TQMutex getXXbyYYmutex;
 #endif
 
 /* some systems have the functions, but don't declare them */
-#ifndef __OpenBSD__
+#if	!defined(__OpenBSD__) && !defined(__dilos__)
 #if defined(HAVE_GETSERVBYNAME_R) && !HAVE_DECL_GETSERVBYNAME_R
 extern "C" {
   struct servent;
Index: tdelibs/tdecore/kdebug.cpp
===================================================================
--- tdelibs.orig/tdecore/kdebug.cpp
+++ tdelibs/tdecore/kdebug.cpp
@@ -753,7 +753,7 @@ TQString formatBacktrace(void *addr) {
 	// NOTE: if somebody would compile for some non-linux-glibc platform
 	//       check if dladdr function is avalible there
 	Dl_info info;
-	dladdr(func.addr, &info); // obtain information about the function.
+	dladdr((void *)func.addr, &info); // obtain information about the function.
 
 	func.fileName = info.dli_fname;
 	func.base = info.dli_fbase;
Index: tdelibs/tdecore/netsupp.cpp
===================================================================
--- tdelibs.orig/tdecore/netsupp.cpp
+++ tdelibs/tdecore/netsupp.cpp
@@ -44,6 +44,7 @@
 #endif
 #undef CLOBBER_IN6
 #include "netsupp.h"
+#include "ksockaddr.h"
 
 #if defined(__hpux) || defined(_HPUX_SOURCE)
 extern int h_errno;
Index: tdelibs/tdecore/ksimpledirwatch.cpp
===================================================================
--- tdelibs.orig/tdecore/ksimpledirwatch.cpp
+++ tdelibs/tdecore/ksimpledirwatch.cpp
@@ -57,7 +57,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/syscall.h>
+#if	defined(__dilos__)
+#include <sys/filio.h>
+#else  /* !__dilos__ */
 #include <linux/types.h>
+#endif /* __dilos__ */
 // Linux kernel headers are documented to not compile
 #define _S390_BITOPS_H
 #include <sys/inotify.h>
Index: tdelibs/cmake/modules/TDEMacros.cmake
===================================================================
--- tdelibs.orig/cmake/modules/TDEMacros.cmake
+++ tdelibs/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: tdelibs/tdecore/CMakeLists.txt
===================================================================
--- tdelibs.orig/tdecore/CMakeLists.txt
+++ tdelibs/tdecore/CMakeLists.txt
@@ -138,7 +138,7 @@ tde_add_library( ${target} SHARED AUTOMO
   EMBED tdecorenetwork-static ${TDEHW_LIB}
   LINK ltdlc-static ${KDESVGICONS} DCOP-shared tdefx-shared ${ZLIB_LIBRARIES}
     ${LIBIDN_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ICE SM ${GAMIN_LIBRARIES}
-    ${LIBBFD_LIBRARIES} ${LIB_UTIL}
+    ${LIBBFD_LIBRARIES} ${LIB_UTIL} -lresolv
   DEPENDENCIES dcopidl dcopidl2cpp
   DESTINATION ${LIB_INSTALL_DIR}
 )
Index: tdelibs/tdeio/tdeio/kdirwatch.cpp
===================================================================
--- tdelibs.orig/tdeio/tdeio/kdirwatch.cpp
+++ tdelibs/tdeio/tdeio/kdirwatch.cpp
@@ -69,7 +69,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/syscall.h>
+#if	defined(__dilos__)
+#include <sys/filio.h>
+#else	/* !__dilos__ */
 #include <linux/types.h>
+#endif	/* __dilos__ */
 // Linux kernel headers are documented to not compile
 #define _S390_BITOPS_H
 #include <sys/inotify.h>
Index: tdelibs/tdeio/misc/kpac/CMakeLists.txt
===================================================================
--- tdelibs.orig/tdeio/misc/kpac/CMakeLists.txt
+++ tdelibs/tdeio/misc/kpac/CMakeLists.txt
@@ -62,5 +62,6 @@ set( target kpac_dhcp_helper )
 # FIXME on Gentoo this binary is not suided
 tde_add_executable( ${target} SETUID
   SOURCES kpac_dhcp_helper.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
Index: tdelibs/tdeinit/CMakeLists.txt
===================================================================
--- tdelibs.orig/tdeinit/CMakeLists.txt
+++ tdelibs/tdeinit/CMakeLists.txt
@@ -51,6 +51,7 @@ set( target tdeinit_wrapper )
 
 tde_add_executable( ${target}
   SOURCES wrapper.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -61,6 +62,7 @@ set( target kshell )
 
 tde_add_executable( ${target}
   SOURCES shell.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -71,6 +73,7 @@ set( target tdeinit_shutdown )
 
 tde_add_executable( ${target}
   SOURCES wrapper.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -81,6 +84,7 @@ set( target lnusertemp )
 
 tde_add_executable( ${target}
   SOURCES lnusertemp.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -91,6 +95,7 @@ set( target kwrapper )
 
 tde_add_executable( ${target}
   SOURCES kwrapper.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
@@ -138,6 +143,7 @@ endif( TDEINIT_SETUID )
 
 tde_add_executable( ${target} ${_setuid}
   SOURCES start_tdeinit.c
+  LINK socket nsl
   DESTINATION ${BIN_INSTALL_DIR}
 )
 
Index: tdelibs/tdehtml/misc/knsplugininstaller.cpp
===================================================================
--- tdelibs.orig/tdehtml/misc/knsplugininstaller.cpp
+++ tdelibs/tdehtml/misc/knsplugininstaller.cpp
@@ -42,6 +42,9 @@
 #include <tqtextstream.h>
 
 #include <sys/utsname.h>
+#ifdef USE_SOLARIS
+#include <sys/systeminfo.h>
+#endif /* USE_SOLARIS */
 
 // Use 6031 for debugging (render_frame)
 #define DEBUG_NUMBER 6031 
@@ -154,10 +157,14 @@ bool KNSPluginInstallEngine::loadXmlConf
 
 bool KNSPluginInstallEngine::findPlugin()
 {
-
+#ifdef USE_SOLARIS
+       struct utsname  sysinfo;
+#else  /* !USE_SOLARIS */
     // get system infos
     // TODO/FIX : correct this to work with x86-64 machines
     utsname sysinfo;
+#endif /* USE_SOLARIS */
+
     if(uname(&sysinfo))
         return false;
     TQString sysname(sysinfo.sysname);
Index: tdelibs/tdeioslave/file/file.cc
===================================================================
--- tdelibs.orig/tdeioslave/file/file.cc
+++ tdelibs/tdeioslave/file/file.cc
@@ -1448,13 +1448,10 @@ void FileProtocol::mount( bool _ro, cons
               // mount giving device + mountpoint + fstype
 #if defined(__svr4__) && defined(__sun__) // MARCO for Solaris 8 and I
                 // believe this is true for SVR4 in general
-                buffer.sprintf( "%s -F %s %s %s %s 2>%s"
-				mountProg.latin1()
-                                fstype.data()
-                                _ro ? "-oro" : ""
-                                dev.data()
-                                point.data()
-                                tmp );
+		buffer.sprintf( "%s -F %s %s %s %s 2>%s",
+			mountProg.latin1(), fstype.data(),
+			_ro ? "-oro" : "", dev.data(),
+			point.data(), tmp);
 #elif defined(__OpenBSD__)
               buffer.sprintf( "%s %s %s -t %s %s %s 2>%s", "tdesu", mountProg.latin1(), readonly.data(),
                               fstype.data(), dev.data(), point.data(), tmp );
Index: tdelibs/tdeio/kssl/kopenssl.cc
===================================================================
--- tdelibs.orig/tdeio/kssl/kopenssl.cc
+++ tdelibs/tdeio/kssl/kopenssl.cc
@@ -348,6 +348,9 @@ TDEConfig *cfg;
             #ifdef _AIX
             << "/opt/freeware/lib/"
 	    #endif
+            #ifdef __dilos__
+	    << "/" SYSTEM_LIBDIR KDELIBSUFF
+	    #endif /* __dilos__ */
 	    << "/usr/" SYSTEM_LIBDIR "/"
 	    << "/usr/ssl/" SYSTEM_LIBDIR "/"
 	    << "/usr/local/" SYSTEM_LIBDIR "/"