]> git.ipfire.org Git - thirdparty/strongswan.git/commit
Avoid inclusion of unistd.h in generated lexers
authorTobias Brunner <tobias@strongswan.org>
Mon, 22 Oct 2018 08:38:53 +0000 (10:38 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 22 Nov 2018 10:17:35 +0000 (11:17 +0100)
commit97c4551ec884fe149a16a3f9c88bd25c397247ad
tree4bc7e8e492e8b10c43ec93b0f69450c8e73420ae
parent85431bf2e7aa37c396f3329e16e863730d05bea5
Avoid inclusion of unistd.h in generated lexers

Because the file is not available on all platforms the inclusion comes
after the user options in order to disable including it.  But that means
the inclusion also follows after the defined scanner states, which are
generated as simple #defines to numbers.  If the included unistd.h e.g.
uses variables in function definitions with the same names this could
result in compilation errors.

Interactive mode has to be disabled too as it relies on isatty() from
unistd.h.  Since we don't use the scanners interactively, this is not a
problem and might even make the scanners a bit faster.

Fixes #2806.
src/libstrongswan/settings/settings_lexer.l
src/starter/parser/lexer.l