Messages in this thread Patch in this message |  | | Subject | Quick fix for genksyms | Date | Tue, 31 Dec 1996 14:06:05 +0100 | From | Olaf Kirch <> |
| |
Here's a quickie patch to get genksyms working with the 2.1.18 patches. I just hacked it together so I could continue working with the current kernel until Richard Henderson comes up with the real thing:-)
The patch is against modutils-961226.
Cheers & a happy new year Olaf ------------------------------------------------------------------ diff -ur genksyms.orig/Makefile genksyms/Makefile --- genksyms.orig/Makefile Sun Dec 15 09:41:50 1996 +++ genksyms/Makefile Tue Dec 31 13:56:36 1996 @@ -3,7 +3,7 @@ LEX=flex # Note: LFLAGS might not be needed... YMWV LFLAGS= -l -# You might want to enable this define depending on your flex. See parsesym.c +# You might want to enable this define depending on your flex. See genksyms.c #YYTEXT_PTR= -DYYTEXT_PTR BINDIR = /sbin @@ -12,19 +12,19 @@ all: genksyms -genksyms: symlex.o parsesym.o - $(CC) $(CFLAGS) -o genksyms symlex.o parsesym.o +genksyms: genk_lex.o genksyms.o + $(CC) $(CFLAGS) -o genksyms genk_lex.o genksyms.o -symlex.o: symlex.c - $(CC) -c $(CFLAGS) $(YYTEXT_PTR) symlex.c +genk_lex.o: genk_lex.c + $(CC) -c $(CFLAGS) $(YYTEXT_PTR) genk_lex.c -symlex.c: symlex.l - $(LEX) $(LFLAGS) symlex.l - mv lex.yy.c symlex.c +genk_lex.c: genk_lex.l + $(LEX) $(LFLAGS) genk_lex.l + mv lex.yy.c genk_lex.c -symlex.o parsesym.o: lexsyms.h +genk_lex.o genksyms.o: genk_lex.h -parsesym.o: crc32.tab +genksyms.o: crc32.tab crc32.tab: makecrc32 ./makecrc32 > crc32.tab @@ -38,7 +38,7 @@ install: install-binaries install-docs clean: - rm -f *.o crc32.tab symlex.c + rm -f *.o crc32.tab genk_lex.c rm -f makecrc32 genksyms test: genksyms diff -ur genksyms.orig/genk_lex.l genksyms/genk_lex.l --- genksyms.orig/genk_lex.l Sun Dec 15 09:44:18 1996 +++ genksyms/genk_lex.l Tue Dec 31 13:35:50 1996 @@ -4,7 +4,7 @@ %{ #include <string.h> #include <ctype.h> -#include "lexsyms.h" +#include "genk_lex.h" extern int line_no; /* * Copyright (C) 1994, Bjorn Ekwall <bj0rn@blox.se> diff -ur genksyms.orig/genksyms.c genksyms/genksyms.c --- genksyms.orig/genksyms.c Fri Dec 20 20:41:06 1996 +++ genksyms/genksyms.c Tue Dec 31 13:54:33 1996 @@ -4,7 +4,7 @@ #include <stdlib.h> #include <limits.h> #include <ctype.h> -#include "lexsyms.h" +#include "genk_lex.h" /* * In this source, the crc and findsym functions are: @@ -68,10 +68,12 @@ static char tmpbuffer[MAXTMP]; static char *pbuffer = tmpbuffer; -const char header[] = +const char *header[] = { "/* This file is generated by genksyms DO NOT EDIT! */\n" "#if (defined(CONFIG_MODVERSIONS) || defined(MODVERSIONS)) &&" -" !defined(__GENKSYMS__)\n"; +" !defined(__GENKSYMS__)\n", +NULL +}; #define MARK '#' /* kludge to mark unresolved references while parsing */ @@ -325,7 +327,7 @@ if (outfile == stdout) { - char **txt = header; + const char **txt = header; /* Print the header */ while (!dump_defs && *txt) @@ -784,7 +786,7 @@ if (outfile_flag && !outfile) { - char **txt = header; + const char **txt = header; if ((outfile = fopen(outfilename, "w")) == (FILE *)0) { ------------------------------------------------------------------
|  |