2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
+ 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.
+
* src/parse-gram.y: Fix minor problems uncovered by lint.
(current_lhs, current_lhs_location): Now static.
(current_assoc): Remove unused variable.
/* Timing variables for measuring compiler performance.
- Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
This file is part of Bison, the GNU Compiler Compiler.
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "config.h"
+
#if IN_GCC
-#include "config.h"
#include "system.h"
#include "intl.h"
#include "rtl.h"
/* See comments in state.h for the data structures that represent it.
The entry point is generate_states. */
+#include <config.h>
#include "system.h"
#include <bitset.h>
reader.c reader.h \
reduce.c reduce.h \
relation.c relation.h \
- scan-gram.l \
- scan-skel.h scan-skel.l \
+ scan-gram-c.c \
+ scan-skel-c.c scan-skel.h \
state.c state.h \
symlist.c symlist.h \
symtab.c symtab.h \
vcg.c vcg.h \
vcg_defaults.h
+EXTRA_bison_SOURCES = scan-skel.l scan-gram.l
+
BUILT_SOURCES = scan-skel.c scan-gram.c parse-gram.c parse-gram.h
MOSTLYCLEANFILES = yacc
/* Associativity information.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include "assoc.h"
/* Closures for Bison
- Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004, 2005 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <bitset.h>
/* Declaration for error-reporting function for Bison.
- Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+
+ Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Based on error.c and error.h,
written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+#include <config.h>
#include "system.h"
#include <stdarg.h>
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <bitset.h>
/* Match rules with nonterminals for bison,
- Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2005 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include "getargs.h"
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <error.h>
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <argmatch.h>
/* Allocate input grammar variables for Bison.
- Copyright (C) 1984, 1986, 1989, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 2001, 2002, 2003, 2005 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <quotearg.h>
/* Compute look-ahead criteria for Bison.
- Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
which rules need look-ahead in each state, and which look-ahead
tokens they accept. */
+#include <config.h>
#include "system.h"
#include <bitset.h>
/* Locations for Bison
- Copyright (C) 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <quotearg.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <bitset_stats.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <hash.h>
/* 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.
the null string. NULLABLE[I - NTOKENS] is nonzero if symbol I can
do so. */
+#include <config.h>
#include "system.h"
#include "getargs.h"
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <error.h>
02110-1301 USA
*/
+#include <config.h>
#include "system.h"
#include "complain.h"
/* Print information on generated parser, for bison,
- Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <bitset.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <quotearg.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <quotearg.h>
/* Grammar reduction for Bison.
- Copyright (C) 1988, 1989, 2000, 2001, 2002, 2003 Free Software
- Foundation, Inc.
+ Copyright (C) 1988, 1989, 2000, 2001, 2002, 2003, 2005 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
/* Don't eliminate unreachable terminals: They may be used by the
user's parser. */
+#include <config.h>
#include "system.h"
#include <bitset.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <bitsetv.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <hash.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include "complain.h"
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <hash.h>
#ifndef BISON_SYSTEM_H
#define BISON_SYSTEM_H
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-
+#include <config.h>
#include "system.h"
#include <bitsetv.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <error.h>
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <quotearg.h>