1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

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.
This commit is contained in:
Ludovic Courtès 2014-02-28 21:00:11 +01:00
parent 6587bcfa53
commit e1bb79fde6

View file

@ -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 noyywrap
%option nounput %option nounput
%pointer %pointer
@ -14,8 +20,6 @@ FLOQUAL (f|F|l|L)
INTQUAL (l|L|ll|LL|lL|Ll|u|U) INTQUAL (l|L|ll|LL|lL|Ll|u|U)
%{ %{
#include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>