tags 521952 +patch
thanks
The flood of "incompatible implicit declaration" messages is just a
missing #include, trivial to fix.
The STAG_??? issue seems to be caused by a change in bison behaviour,
the old version declared those names both as names in an enum AND as
#defines. The newer version declares them only as names in an enum.
The trouble is that stag.c includes headers for two different bison
generated parsers (stag.h and rpc_tab.h) theese have the same name for
the enum and the same name for an ifdef gaurding against multiple
declarations of the enum in the case of multiple inclusions. So only one
of the two enums gets defined and there are a load of missing identifiers.
The attached patch adds missing includes, works arround the STAG_???
issue with a little sed magic and adds -Werror to the cflags (I added
this to find issues with further missing includes and decided I may as
well leave it in). It builds successfully but has not been tested.
diff -ur jbofihe-0.38/categ.c jbofihe-0.38.new/categ.c
--- jbofihe-0.38/categ.c 2001-09-15 23:10:37.000000000 +0100
+++ jbofihe-0.38.new/categ.c 2009-04-06 01:08:12.000000000 +0100
@@ -31,6 +31,7 @@
#include "rpc_tab.h"
#include "functions.h"
#include "stag.h"
+#include <string.h>
/*++++++++++++++++++++++++++++++
Look for any cmavo of selma'o JA and back up to where the 'jek'
diff -ur jbofihe-0.38/debian/rules jbofihe-0.38.new/debian/rules
--- jbofihe-0.38/debian/rules 2009-04-06 01:45:01.000000000 +0100
+++ jbofihe-0.38.new/debian/rules 2009-04-06 01:47:53.000000000 +0100
@@ -23,9 +23,14 @@
ln -sf /usr/share/lojban/lujvo.txt .
ln -sf /usr/share/lojban/NORALUJV.txt .
- PATH=`pwd`/bin:$$PATH \
- $(MAKE) all
+ #work arround an issue with including multiple bision parsers in one
+ #C source file
+ PATH=`pwd`/bin:$$PATH $(MAKE) stag.h
+ sed -i s/YYTOKENTYPE/STAGYYTOKENTYPE/ stag.h
+ sed -i s/yytokentype/stagyytokentype/ stag.h
+
+ PATH=`pwd`/bin:$$PATH $(MAKE) all
touch build-stamp
clean:
diff -ur jbofihe-0.38/functions.c jbofihe-0.38.new/functions.c
--- jbofihe-0.38/functions.c 2001-09-15 23:10:39.000000000 +0100
+++ jbofihe-0.38.new/functions.c 2009-04-06 01:37:07.000000000 +0100
@@ -25,6 +25,7 @@
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
+#include <string.h>
#include "functions.h"
#include "nonterm.h"
#include "rpc_tab.h"
diff -ur jbofihe-0.38/Makefile.in jbofihe-0.38.new/Makefile.in
--- jbofihe-0.38/Makefile.in 2009-04-06 01:45:01.000000000 +0100
+++ jbofihe-0.38.new/Makefile.in 2009-04-06 01:35:18.000000000 +0100
@@ -30,7 +30,7 @@
CMAFIHE_LDOPTS=@@CMAFIHE_LDOPTS@@
CC=gcc
-CFLAGS= @@OPTDEBUG@@ @@DEFINES@@ -DDEFAULT_DICTIONARY=\"$(DICTIONARY)\"
+CFLAGS= -Werror @@OPTDEBUG@@ @@DEFINES@@ -DDEFAULT_DICTIONARY=\"$(DICTIONARY)\"
OBJS2 = main.o lex1.o lex2.o cmavotab.o rpc_tab.o functions.o \
categ.o nonterm.o tree.o translate.o latex.o \
diff -ur jbofihe-0.38/morf.c jbofihe-0.38.new/morf.c
--- jbofihe-0.38/morf.c 2001-09-15 23:10:40.000000000 +0100
+++ jbofihe-0.38.new/morf.c 2009-04-06 01:43:58.000000000 +0100
@@ -32,6 +32,8 @@
*
*********************************************************************/
+#include <stdlib.h>
+
#ifdef TEST_MORF
#include <stdio.h>
#include <string.h>
Only in jbofihe-0.38.new: morf_enc.err