mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									84250386ef
								
							
						
					
					
						commit
						5a6f8d2bd9
					
				
					 17 changed files with 9 additions and 76 deletions
				
			
		| 
						 | 
				
			
			@ -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) \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,6 @@
 | 
			
		|||
#include <time.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
static void conf_warning(const char *fmt, ...)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,6 @@
 | 
			
		|||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
#define DEBUG_EXPR	0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -785,7 +785,6 @@ char *zconftext;
 | 
			
		|||
#include <string.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
#define START_STRSIZE	16
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,6 @@
 | 
			
		|||
#include <unistd.h>
 | 
			
		||||
#include <locale.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
#include "lxdialog/dialog.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,6 @@
 | 
			
		|||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
static const char nohelp_text[] = N_(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
 */
 | 
			
		||||
#define _GNU_SOURCE
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
#include "nconf.h"
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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] == '-') {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,6 @@
 | 
			
		|||
#include <regex.h>
 | 
			
		||||
#include <sys/utsname.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
struct symbol symbol_yes = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,6 @@
 | 
			
		|||
#include <string.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
 | 
			
		||||
#define LKC_DIRECT_LINK
 | 
			
		||||
#include "lkc.h"
 | 
			
		||||
 | 
			
		||||
#define START_STRSIZE	16
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue