diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-02-28 21:00:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-02-28 21:01:27 +0100 |
commit | e1bb79fde62e678c0f8ceb32c7edd2dab0201a5c (patch) | |
tree | 137949c71bd4743df988e03247bc07cf5ae36da6 /libguile/c-tokenize.lex | |
parent | 6587bcfa53f620142e4f712ad347a25e3c33a9bc (diff) | |
download | guile-e1bb79fde62e678c0f8ceb32c7edd2dab0201a5c.tar.gz |
build: Make c-tokenize.c build on non-GNU systems.
* libguile/c-tokenize.lex: Add %top directive to include <config.h>
first. This fixes builds on systems that use Gnulib's <stdio.h> and
similar replacements. See <http://hydra.nixos.org/build/9259627> for
an example.
Diffstat (limited to 'libguile/c-tokenize.lex')
-rw-r--r-- | libguile/c-tokenize.lex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/c-tokenize.lex b/libguile/c-tokenize.lex index 856224e46..a64b61da4 100644 --- a/libguile/c-tokenize.lex +++ b/libguile/c-tokenize.lex @@ -1,3 +1,9 @@ +%top{ +/* Include <config.h> before anything else because Gnulib headers such + as <stdio.h> rely on it. */ +#include <config.h> +} + %option noyywrap %option nounput %pointer @@ -14,8 +20,6 @@ FLOQUAL (f|F|l|L) INTQUAL (l|L|ll|LL|lL|Ll|u|U) %{ -#include <config.h> - #include <stdio.h> #include <stdlib.h> #include <string.h> |