KIOSlave

Karl Vogel <[email protected]>
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>
kioslave only uses 1 QT exported object (QCString), which causes it to link to 
27 extra libraries! Following patch removes the QCString and thus doesn't 
need linking with all those shared libs. (which reduces the binary size and 
the startup time in the dynamic linker)

I'm not sure if the libpath.isEmpty() check was really necessary?!

_______________________________________________
Kde-optimize mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-optimize
kioslave.patch (text/x-diff, 1.6 KB)
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdelibs/kinit/Makefile.am,v
retrieving revision 1.33
diff -u -r1.33 Makefile.am
--- Makefile.am	1 Jul 2004 16:05:11 -0000	1.33
+++ Makefile.am	24 Jul 2004 09:53:28 -0000
@@ -31,9 +31,7 @@
 kdeinit_LDADD = $(LIB_KPARTS) 
 
 kioslave_SOURCES = kioslave.cpp
-kioslave_LDFLAGS = $(KDE_MT_LDFLAGS) $(QT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) \
-                  $(KDE_RPATH)
-kioslave_LDADD = $(LIB_KIO) 
+kioslave_LDADD = ../libltdl/libltdlc.la
 
 kdeinit_wrapper_SOURCES = wrapper.c
 kdeinit_wrapper_LDADD = $(LIBSOCKET)
Index: kioslave.cpp
===================================================================
RCS file: /home/kde/kdelibs/kinit/kioslave.cpp,v
retrieving revision 1.1
diff -u -r1.1 kioslave.cpp
--- kioslave.cpp	23 Jan 2002 06:28:28 -0000	1.1
+++ kioslave.cpp	24 Jul 2004 09:53:28 -0000
@@ -54,20 +54,14 @@
         fprintf(stderr, "Usage: kioslave <slave-lib> <protocol> <klauncher-socket> <app-socket>\n\nThis program is part of KDE.\n");
         exit(1);
      }
-     QCString libpath = argv[1];     
 
-     if (libpath.isEmpty())
-     {
-        fprintf(stderr, "library path is empty.\n");
-        exit(1); 
-     }
      lt_dlinit();
 
-     lt_dlhandle handle = lt_dlopen( libpath.data() );
+     lt_dlhandle handle = lt_dlopen( argv[1] );
      if (!handle )
      {
         const char * ltdlError = lt_dlerror();
-        fprintf(stderr, "could not open %s: %s", libpath.data(), ltdlError != 0 ? ltdlError : "(null)" );
+        fprintf(stderr, "could not open %s: %s", argv[1], ltdlError != 0 ? ltdlError : "(null)" );
         exit(1);
      }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.