From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH nftables] fix parser.h recursive inclusion
Date: Thu, 16 Jan 2014 18:04:27 +0000 [thread overview]
Message-ID: <20140116180426.GA12421@macbook.localnet> (raw)
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.
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$<"
next reply other threads:[~2014-01-16 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 18:04 Patrick McHardy [this message]
2014-01-16 18:15 ` [PATCH nftables] fix parser.h recursive inclusion Pablo Neira Ayuso
2014-01-16 18:38 ` Patrick McHardy
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=20140116180426.GA12421@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.