Work around portability problem on Solaris 10: flex-generated

files include <stdio.h> before <config.h>, which messes up
because the latter defines __EXTENSIONS__.  Address the problem
by creating two new little files that include <config.h> first,
then include the flex-generated files.  Rewrite everyone else
to include <config.h> first, as well.
* lib/timevar.c: Always include "config.h".
* src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
(EXTRA_bison_SOURCES): New macro.
* src/scan-gram-c.c, src/scan-skel-c.c: New files.
* src/system.h: Don't include config.h.
* src/LR0.c: Include <config.h> first.
* src/assoc.c: Likewise.
* src/closure.c: Likewise.
* src/complain.c: Likewise.
* src/conflicts.c: Likewise.
* src/derives.c: Likewise.
* src/files.c: Likewise.
* src/getargs.c: Likewise.
* src/gram.c: Likewise.
* src/lalr.c: Likewise.
* src/location.c: Likewise.
* src/main.c: Likewise.
* src/muscle_tab.c: Likewise.
* src/nullable.c: Likewise.
* src/output.c: Likewise.
* src/parse-gram.y: Likewise.
* src/print.c: Likewise.
* src/print_graph.c: Likewise.
* src/reader.c: Likewise.
* src/reduce.c: Likewise.
* src/relation.c: Likewise.
* src/state.c: Likewise.
* src/symlist.c: Likewise.
* src/symtab.c: Likewise.
* src/tables.c: Likewise.
* src/uniqstr.c: Likewise.
* src/vcg.c: Likewise.
This commit is contained in:
Paul Eggert
2005-12-09 23:51:26 +00:00
parent 7029f8927f
commit 2cec9080f6
31 changed files with 90 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
/* Calculate which nonterminals can expand into the null string for Bison.
Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2004 Free
Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -25,6 +25,7 @@
the null string. NULLABLE[I - NTOKENS] is nonzero if symbol I can
do so. */
#include <config.h>
#include "system.h"
#include "getargs.h"