Skip to content

Commit

Permalink
Merge pull request elastic#50 from balabit/merge/h/bison-3
Browse files Browse the repository at this point in the history
Bison 3 fixes
  • Loading branch information
bazsi committed Dec 25, 2013
2 parents 920b1ff + 8797068 commit acbf591
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBDIRS =
AM_MAKEFLAGS = --no-print-directory
AM_YFLAGS = -Wno-yacc -Wno-other

AM_TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)"

Expand Down
2 changes: 1 addition & 1 deletion Mk/lex-rules.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%.y: %.ym $(syslog_ng_tools)/merge-grammar.pl $(syslog_ng_tools)/cfg-grammar.y
$(mkinstalldirs) $(dir $@)
$(AM_V_at) $(mkinstalldirs) $(dir $@)
$(AM_V_GEN) $(syslog_ng_tools)/merge-grammar.pl $< > $@

.l.c:
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ if echo "$YACC" | grep bison > /dev/null; then
if test "$bison_version_major" -lt 2 -o "$bison_version_minor" -lt 4; then
yacc_ok=0
fi
if test "$bison_version_major" -gt 2; then
yacc_ok=1
fi
else
yacc_ok=0
fi
Expand Down
4 changes: 4 additions & 0 deletions lib/cfg-grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ extern struct _StatsOptions *last_stats_options;

%code {

# ifndef YYID
# define YYID(N) N
# endif

# define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \
if (YYID (N)) \
Expand Down

0 comments on commit acbf591

Please sign in to comment.