Commit 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b

Authored by Arnaud Lacombe
1 parent 84250386ef

kconfig: nuke LKC_DIRECT_LINK cruft

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>

Showing 17 changed files with 9 additions and 76 deletions Side-by-side Diff

scripts/kconfig/Makefile
... ... @@ -170,8 +170,8 @@
170 170 nconf-objs := nconf.o zconf.tab.o nconf.gui.o
171 171 kxgettext-objs := kxgettext.o zconf.tab.o
172 172 qconf-cxxobjs := qconf.o
173   -qconf-objs := kconfig_load.o zconf.tab.o
174   -gconf-objs := gconf.o kconfig_load.o zconf.tab.o
  173 +qconf-objs := zconf.tab.o
  174 +gconf-objs := gconf.o zconf.tab.o
175 175  
176 176 hostprogs-y := conf
177 177  
... ... @@ -203,7 +203,7 @@
203 203 hostprogs-y += gconf
204 204 endif
205 205  
206   -clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
  206 +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
207 207 clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
208 208 clean-files += mconf qconf gconf nconf
209 209 clean-files += config.pot linux.pot
210 210  
... ... @@ -223,12 +223,11 @@
223 223 HOSTCFLAGS_lex.zconf.o := -I$(src)
224 224 HOSTCFLAGS_zconf.tab.o := -I$(src)
225 225  
226   -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
227   -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
  226 +HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
  227 +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
228 228  
229   -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
230   -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
231   - -D LKC_DIRECT_LINK
  229 +HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
  230 +HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0`
232 231  
233 232 HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
234 233  
235 234  
236 235  
... ... @@ -318,17 +317,10 @@
318 317  
319 318 $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
320 319  
321   -$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
  320 +$(obj)/qconf.o: $(obj)/qconf.moc
322 321  
323   -$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
324   -
325   -$(obj)/gconf.o: $(obj)/lkc_defs.h
326   -
327 322 $(obj)/%.moc: $(src)/%.h
328 323 $(KC_QT_MOC) -i $< -o $@
329   -
330   -$(obj)/lkc_defs.h: $(src)/lkc_proto.h
331   - $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
332 324  
333 325 # Extract gconf menu items for I18N support
334 326 $(obj)/gconf.glade.h: $(obj)/gconf.glade
scripts/kconfig/conf.c
... ... @@ -14,7 +14,6 @@
14 14 #include <sys/stat.h>
15 15 #include <sys/time.h>
16 16  
17   -#define LKC_DIRECT_LINK
18 17 #include "lkc.h"
19 18  
20 19 static void conf(struct menu *menu);
scripts/kconfig/confdata.c
... ... @@ -14,7 +14,6 @@
14 14 #include <time.h>
15 15 #include <unistd.h>
16 16  
17   -#define LKC_DIRECT_LINK
18 17 #include "lkc.h"
19 18  
20 19 static void conf_warning(const char *fmt, ...)
scripts/kconfig/expr.c
... ... @@ -7,7 +7,6 @@
7 7 #include <stdlib.h>
8 8 #include <string.h>
9 9  
10   -#define LKC_DIRECT_LINK
11 10 #include "lkc.h"
12 11  
13 12 #define DEBUG_EXPR 0
scripts/kconfig/gconf.c
... ... @@ -1507,10 +1507,6 @@
1507 1507 char *env;
1508 1508 gchar *glade_file;
1509 1509  
1510   -#ifndef LKC_DIRECT_LINK
1511   - kconfig_load();
1512   -#endif
1513   -
1514 1510 bindtextdomain(PACKAGE, LOCALEDIR);
1515 1511 bind_textdomain_codeset(PACKAGE, "UTF-8");
1516 1512 textdomain(PACKAGE);
scripts/kconfig/kconfig_load.c
1   -#include <dlfcn.h>
2   -#include <stdio.h>
3   -#include <stdlib.h>
4   -
5   -#include "lkc.h"
6   -
7   -#define P(name,type,arg) type (*name ## _p) arg
8   -#include "lkc_proto.h"
9   -#undef P
10   -
11   -void kconfig_load(void)
12   -{
13   - void *handle;
14   - char *error;
15   -
16   - handle = dlopen("./libkconfig.so", RTLD_LAZY);
17   - if (!handle) {
18   - handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
19   - if (!handle) {
20   - fprintf(stderr, "%s\n", dlerror());
21   - exit(1);
22   - }
23   - }
24   -
25   -#define P(name,type,arg) \
26   -{ \
27   - name ## _p = dlsym(handle, #name); \
28   - if ((error = dlerror())) { \
29   - fprintf(stderr, "%s\n", error); \
30   - exit(1); \
31   - } \
32   -}
33   -#include "lkc_proto.h"
34   -#undef P
35   -}
scripts/kconfig/kxgettext.c
... ... @@ -7,7 +7,6 @@
7 7 #include <stdlib.h>
8 8 #include <string.h>
9 9  
10   -#define LKC_DIRECT_LINK
11 10 #include "lkc.h"
12 11  
13 12 static char *escape(const char* text, char *bf, int len)
scripts/kconfig/lex.zconf.c_shipped
... ... @@ -785,7 +785,6 @@
785 785 #include <string.h>
786 786 #include <unistd.h>
787 787  
788   -#define LKC_DIRECT_LINK
789 788 #include "lkc.h"
790 789  
791 790 #define START_STRSIZE 16
scripts/kconfig/lkc.h
... ... @@ -21,12 +21,7 @@
21 21 extern "C" {
22 22 #endif
23 23  
24   -#ifdef LKC_DIRECT_LINK
25 24 #define P(name,type,arg) extern type name arg
26   -#else
27   -#include "lkc_defs.h"
28   -#define P(name,type,arg) extern type (*name ## _p) arg
29   -#endif
30 25 #include "lkc_proto.h"
31 26 #undef P
32 27  
scripts/kconfig/mconf.c
... ... @@ -18,7 +18,6 @@
18 18 #include <unistd.h>
19 19 #include <locale.h>
20 20  
21   -#define LKC_DIRECT_LINK
22 21 #include "lkc.h"
23 22 #include "lxdialog/dialog.h"
24 23  
scripts/kconfig/menu.c
... ... @@ -8,7 +8,6 @@
8 8 #include <stdlib.h>
9 9 #include <string.h>
10 10  
11   -#define LKC_DIRECT_LINK
12 11 #include "lkc.h"
13 12  
14 13 static const char nohelp_text[] = N_(
scripts/kconfig/nconf.c
... ... @@ -7,7 +7,7 @@
7 7 */
8 8 #define _GNU_SOURCE
9 9 #include <string.h>
10   -#define LKC_DIRECT_LINK
  10 +
11 11 #include "lkc.h"
12 12 #include "nconf.h"
13 13 #include <ctype.h>
scripts/kconfig/qconf.cc
... ... @@ -1745,10 +1745,6 @@
1745 1745 bindtextdomain(PACKAGE, LOCALEDIR);
1746 1746 textdomain(PACKAGE);
1747 1747  
1748   -#ifndef LKC_DIRECT_LINK
1749   - kconfig_load();
1750   -#endif
1751   -
1752 1748 progname = av[0];
1753 1749 configApp = new QApplication(ac, av);
1754 1750 if (ac > 1 && av[1][0] == '-') {
scripts/kconfig/symbol.c
... ... @@ -9,7 +9,6 @@
9 9 #include <regex.h>
10 10 #include <sys/utsname.h>
11 11  
12   -#define LKC_DIRECT_LINK
13 12 #include "lkc.h"
14 13  
15 14 struct symbol symbol_yes = {
scripts/kconfig/zconf.l
... ... @@ -14,7 +14,6 @@
14 14 #include <string.h>
15 15 #include <unistd.h>
16 16  
17   -#define LKC_DIRECT_LINK
18 17 #include "lkc.h"
19 18  
20 19 #define START_STRSIZE 16
scripts/kconfig/zconf.tab.c_shipped
... ... @@ -88,7 +88,6 @@
88 88 #include <string.h>
89 89 #include <stdbool.h>
90 90  
91   -#define LKC_DIRECT_LINK
92 91 #include "lkc.h"
93 92  
94 93 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
scripts/kconfig/zconf.y
... ... @@ -11,7 +11,6 @@
11 11 #include <string.h>
12 12 #include <stdbool.h>
13 13  
14   -#define LKC_DIRECT_LINK
15 14 #include "lkc.h"
16 15  
17 16 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)