From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nftables] fix parser.h recursive inclusion
Date: Thu, 16 Jan 2014 18:38:04 +0000 [thread overview]
Message-ID: <20140116183804.GB30318@macbook.localnet> (raw)
In-Reply-To: <20140116181520.GA18874@localhost>
On Thu, Jan 16, 2014 at 07:15:20PM +0100, Pablo Neira Ayuso wrote:
> On Thu, Jan 16, 2014 at 06:04:27PM +0000, Patrick McHardy wrote:
> > This the recursive parser.h inclusion that happens occasionally when
> > regenerating the parser files. Amazingly bison, despite its age, is
> > not using header sandwiches to protect against this *sigh*
> >
> > Slightly ugly, but fixes the problem.
>
> Ah, much nicer than the "nested too deep" warning message :)
Indeed. Pushed out to master.
>
> > diff --git a/Makefile.rules.in b/Makefile.rules.in
> > index 25988dd..ae563a5 100644
> > --- a/Makefile.rules.in
> > +++ b/Makefile.rules.in
> > @@ -22,7 +22,14 @@ configure: configure.ac
> >
> > %.c %.h: %.y $(makedeps)
> > @echo -e " YACC\t\t$<"
> > - $(YACC) $(YACCFLAGS) -d -o $@ $<
> > + $(YACC) $(YACCFLAGS) --defines=$*.h.tmp -o $@ $<
> > + ( \
> > + echo "#ifndef __$(*F)_H"; \
> > + echo "#define __$(*F)_H"; \
> > + cat $*.h.tmp; \
> > + echo "#endif /* __$(*F)_H */" \
> > + ) > $*.h
> > + $(RM) $*.h.tmp
> >
> > %.c %.h: %.l $(makedeps)
> > @echo -e " LEX\t\t$<"
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-01-16 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 18:04 [PATCH nftables] fix parser.h recursive inclusion Patrick McHardy
2014-01-16 18:15 ` Pablo Neira Ayuso
2014-01-16 18:38 ` Patrick McHardy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140116183804.GB30318@macbook.localnet \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).