wont build on SuSE 9.2
Brought to you by:
cthuang
I get the following when trying to build on SuSE 9.2
(and Redhat 9):
gcc -g -O2 -I. -DMAX_INC_DIR=64 -DMAX_INC_DEPTH=64
-DHAVE_CONFIG_H -I. -DMAX_INC_DIR=64
-DMAX_INC_DEPTH=64 -DHAVE_CONFIG_H -c -o y.tab.o y.tab.c
./grammar.y:171: error: conflicting types for `YYSTYPE'
cproto.h:119: error: previous declaration of `YYSTYPE'
./grammar.y: In function `yyparse':
./grammar.y:207: error: request for member `decl_spec'
in something not a structure or union
...
What gives?
Logged In: NO
Here is a solution to this problem, which occurs on many
platforms. At the beginning of grammar.y, add:
%{
#define YYSTYPE_IS_DECLARED
%}
Logged In: NO
Or, download last version 4.7d that compiles fine from
http://freshmeat.net/projects/cproto/?branch_id=48534&release_id=204690
http://linux.softpedia.com/progDownload/cproto-Download-4175.html
Logged In: YES
user_id=2069680
Originator: NO
for those who wants to use cproto and reach this problem, the following patch works for me:
diff --git a/grammar.y b/grammar.y
index f54ebb0..7bd5ff4 100644
--- a/grammar.y
+++ b/grammar.y
@@ -69,6 +69,7 @@
#include "semantic.h"
#define YYMAXDEPTH 150
+#define YYSTYPE_IS_DECLARED 1
extern int yylex ARGS((void));
Logged In: YES
user_id=2069680
Originator: NO
sorry for the noise, I didn't scroll back :/.
Maybe should the 4.7f[1] be uploaded on sf.net and this bug be closed ?
[1]: ftp://invisible-island.net/cproto/cproto-4.7f.tgz
I have the same problem!