kconfig: nuke LKC_DIRECT_LINK cruft
authorArnaud Lacombe <lacombar@gmail.com>
Wed, 1 Jun 2011 20:14:47 +0000 (16:14 -0400)
committerArnaud Lacombe <lacombar@gmail.com>
Mon, 6 Jun 2011 19:32:20 +0000 (15:32 -0400)
This interface is not (and has never been ?) used by any frontend, just get rid
of it.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
17 files changed:
scripts/kconfig/Makefile
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
scripts/kconfig/expr.c
scripts/kconfig/gconf.c
scripts/kconfig/kconfig_load.c [deleted file]
scripts/kconfig/kxgettext.c
scripts/kconfig/lex.zconf.c_shipped
scripts/kconfig/lkc.h
scripts/kconfig/mconf.c
scripts/kconfig/menu.c
scripts/kconfig/nconf.c
scripts/kconfig/qconf.cc
scripts/kconfig/symbol.c
scripts/kconfig/zconf.l
scripts/kconfig/zconf.tab.c_shipped
scripts/kconfig/zconf.y

index faa9a4701b6f27259b9f0094aa9ee3584f237fe4..0460ac3b358850f80928c55a6f56297190db5072 100644 (file)
@@ -170,8 +170,8 @@ mconf-objs     := mconf.o zconf.tab.o $(lxdialog)
 nconf-objs     := nconf.o zconf.tab.o nconf.gui.o
 kxgettext-objs := kxgettext.o zconf.tab.o
 qconf-cxxobjs  := qconf.o
-qconf-objs     := kconfig_load.o zconf.tab.o
-gconf-objs     := gconf.o kconfig_load.o zconf.tab.o
+qconf-objs     := zconf.tab.o
+gconf-objs     := gconf.o zconf.tab.o
 
 hostprogs-y := conf
 
@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1)
        hostprogs-y += gconf
 endif
 
-clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
+clean-files    := qconf.moc .tmp_qtcheck .tmp_gtkcheck
 clean-files    += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
 clean-files     += mconf qconf gconf nconf
 clean-files     += config.pot linux.pot
@@ -223,12 +223,11 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC)
 HOSTCFLAGS_lex.zconf.o := -I$(src)
 HOSTCFLAGS_zconf.tab.o := -I$(src)
 
-HOSTLOADLIBES_qconf    = $(KC_QT_LIBS) -ldl
-HOSTCXXFLAGS_qconf.o   = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
+HOSTLOADLIBES_qconf    = $(KC_QT_LIBS)
+HOSTCXXFLAGS_qconf.o   = $(KC_QT_CFLAGS)
 
-HOSTLOADLIBES_gconf    = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
-HOSTCFLAGS_gconf.o     = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
-                          -D LKC_DIRECT_LINK
+HOSTLOADLIBES_gconf    = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
+HOSTCFLAGS_gconf.o     = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0`
 
 HOSTLOADLIBES_mconf   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
 
@@ -318,18 +317,11 @@ endif
 
 $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
 
-$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
-
-$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
-
-$(obj)/gconf.o: $(obj)/lkc_defs.h
+$(obj)/qconf.o: $(obj)/qconf.moc
 
 $(obj)/%.moc: $(src)/%.h
        $(KC_QT_MOC) -i $< -o $@
 
-$(obj)/lkc_defs.h: $(src)/lkc_proto.h
-       $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
-
 # Extract gconf menu items for I18N support
 $(obj)/gconf.glade.h: $(obj)/gconf.glade
        $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
index 6d2e936f3b6791d1bc2d49cb5dddff83edbcb84b..08c05bcc82c983c499d7486f0f32aee69fa60b40 100644 (file)
@@ -14,7 +14,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 static void conf(struct menu *menu);
index ca16ab4367dd04fc0ea644d0f7213c286f9bed1a..c257bb0bf90aea392c96ce3f13aaffb0541ca3ff 100644 (file)
@@ -14,7 +14,6 @@
 #include <time.h>
 #include <unistd.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 static void conf_warning(const char *fmt, ...)
index 001003452f6872aef385099f1d660ffa1054a288..792c62ed9d636b814df013fcc2557b6f3e47a383 100644 (file)
@@ -7,7 +7,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 #define DEBUG_EXPR     0
index c406bde28dbe6428819fb2719d7c5aa8c7aa97bf..9258957a09136259fa0bfd450bc4adb91a847490 100644 (file)
@@ -1507,10 +1507,6 @@ int main(int ac, char *av[])
        char *env;
        gchar *glade_file;
 
-#ifndef LKC_DIRECT_LINK
-       kconfig_load();
-#endif
-
        bindtextdomain(PACKAGE, LOCALEDIR);
        bind_textdomain_codeset(PACKAGE, "UTF-8");
        textdomain(PACKAGE);
diff --git a/scripts/kconfig/kconfig_load.c b/scripts/kconfig/kconfig_load.c
deleted file mode 100644 (file)
index dbdcaad..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "lkc.h"
-
-#define P(name,type,arg)       type (*name ## _p) arg
-#include "lkc_proto.h"
-#undef P
-
-void kconfig_load(void)
-{
-       void *handle;
-       char *error;
-
-       handle = dlopen("./libkconfig.so", RTLD_LAZY);
-       if (!handle) {
-               handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
-               if (!handle) {
-                       fprintf(stderr, "%s\n", dlerror());
-                       exit(1);
-               }
-       }
-
-#define P(name,type,arg)                       \
-{                                              \
-       name ## _p = dlsym(handle, #name);      \
-        if ((error = dlerror()))  {            \
-                fprintf(stderr, "%s\n", error);        \
-               exit(1);                        \
-       }                                       \
-}
-#include "lkc_proto.h"
-#undef P
-}
index e9d8e791bf0d2d71e19dbaa447488b138a5d00fe..2858738b22d5aeac27154f74af433540839d37a6 100644 (file)
@@ -7,7 +7,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 static char *escape(const char* text, char *bf, int len)
index d9182916f72494d3138a93a352f24a11ee3f06e7..dcea7a74431734a7ad0287c0db137d0f131f5b32 100644 (file)
@@ -785,7 +785,6 @@ char *zconftext;
 #include <string.h>
 #include <unistd.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 #define START_STRSIZE  16
index febf0c94d5583b37a1411d601ab387998c4dc2d4..625ec69ebeee3ef05222bc7fe15fb75cbf7a1882 100644 (file)
@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;
 extern "C" {
 #endif
 
-#ifdef LKC_DIRECT_LINK
 #define P(name,type,arg)       extern type name arg
-#else
-#include "lkc_defs.h"
-#define P(name,type,arg)       extern type (*name ## _p) arg
-#endif
 #include "lkc_proto.h"
 #undef P
 
index 87001e62cefd00bcd6841e871f4178163d44246a..820d2b6800fb5d856a56394cd9786610337fc8b8 100644 (file)
@@ -18,7 +18,6 @@
 #include <unistd.h>
 #include <locale.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 #include "lxdialog/dialog.h"
 
index 24547fe0fe9ee455aea7b17e13c949abcb4d5aab..aab5a1fee5a89e9d995369dd8a07b33ee7734929 100644 (file)
@@ -8,7 +8,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 static const char nohelp_text[] = N_(
index 488dd741078747132b08dc9afb33001f4a03db5a..da9f5c49d886098417b066ccef5ffb9578281abe 100644 (file)
@@ -7,7 +7,7 @@
  */
 #define _GNU_SOURCE
 #include <string.h>
-#define LKC_DIRECT_LINK
+
 #include "lkc.h"
 #include "nconf.h"
 #include <ctype.h>
index c2796b866f8f14a37453f409429b900e1f11ba44..31e01cdbfc6ea11dde098c26b5bc08624a591968 100644 (file)
@@ -1745,10 +1745,6 @@ int main(int ac, char** av)
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
 
-#ifndef LKC_DIRECT_LINK
-       kconfig_load();
-#endif
-
        progname = av[0];
        configApp = new QApplication(ac, av);
        if (ac > 1 && av[1][0] == '-') {
index a796c95fe8a0eb460688cf7ab8201a6e77d4c794..cf8edf4fc429a70eb8e3d9e876a2e3d0b98b7f86 100644 (file)
@@ -9,7 +9,6 @@
 #include <regex.h>
 #include <sys/utsname.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 struct symbol symbol_yes = {
index b22f884f90221650ed46ef4cf509bf6a3b33170e..29b79f4c34c22b0483a130d3709dff31c2111c14 100644 (file)
@@ -14,7 +14,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 #define START_STRSIZE  16
index 4c5495ea205e646ef9c4efff923dd6a678dbda4b..c1579e6e79a65da88ad83ed1b653812ac3b920b2 100644 (file)
@@ -88,7 +88,6 @@
 #include <string.h>
 #include <stdbool.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
index 49fb4ab664c39b555692896f97fc8d6bfad36cd1..29c391f51606f514430b86cc75b8b1a18a9c5217 100644 (file)
@@ -11,7 +11,6 @@
 #include <string.h>
 #include <stdbool.h>
 
-#define LKC_DIRECT_LINK
 #include "lkc.h"
 
 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
This page took 0.035764 seconds and 5 git commands to generate.