bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

flex porting glitch on Solaris 10 affects Bison


From: Paul Eggert
Subject: flex porting glitch on Solaris 10 affects Bison
Date: Fri, 09 Dec 2005 15:55:04 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this:

2005-12-09  Paul Eggert  <address@hidden>

        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.

Index: lib/timevar.c
===================================================================
RCS file: /cvsroot/bison/bison/lib/timevar.c,v
retrieving revision 1.8
diff -p -u -r1.8 timevar.c
--- lib/timevar.c       24 Jul 2005 07:24:22 -0000      1.8
+++ lib/timevar.c       9 Dec 2005 23:41:15 -0000
@@ -1,5 +1,5 @@
 /* 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 <address@hidden>
 
 This file is part of Bison, the GNU Compiler Compiler.
@@ -19,9 +19,10 @@ along with Bison; see the file COPYING. 
 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"
Index: src/LR0.c
===================================================================
RCS file: /cvsroot/bison/bison/src/LR0.c,v
retrieving revision 1.94
diff -p -u -r1.94 LR0.c
--- src/LR0.c   9 Nov 2005 15:48:04 -0000       1.94
+++ src/LR0.c   9 Dec 2005 23:41:15 -0000
@@ -24,6 +24,7 @@
 /* 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>
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/src/Makefile.am,v
retrieving revision 1.66
diff -p -u -r1.66 Makefile.am
--- src/Makefile.am     25 Jul 2005 03:12:53 -0000      1.66
+++ src/Makefile.am     9 Dec 2005 23:41:15 -0000
@@ -53,8 +53,8 @@ bison_SOURCES =                                         \
        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                         \
@@ -63,6 +63,8 @@ bison_SOURCES =                                         \
        uniqstr.c uniqstr.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
 
Index: src/assoc.c
===================================================================
RCS file: /cvsroot/bison/bison/src/assoc.c,v
retrieving revision 1.5
diff -p -u -r1.5 assoc.c
--- src/assoc.c 14 May 2005 06:49:47 -0000      1.5
+++ src/assoc.c 9 Dec 2005 23:41:15 -0000
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -18,6 +18,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include "assoc.h"
Index: src/closure.c
===================================================================
RCS file: /cvsroot/bison/bison/src/closure.c,v
retrieving revision 1.73
diff -p -u -r1.73 closure.c
--- src/closure.c       5 Oct 2005 06:39:07 -0000       1.73
+++ src/closure.c       9 Dec 2005 23:41:15 -0000
@@ -1,7 +1,7 @@
 /* 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.
 
@@ -20,6 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <bitset.h>
Index: src/complain.c
===================================================================
RCS file: /cvsroot/bison/bison/src/complain.c,v
retrieving revision 1.22
diff -p -u -r1.22 complain.c
--- src/complain.c      14 May 2005 06:49:47 -0000      1.22
+++ src/complain.c      9 Dec 2005 23:41:15 -0000
@@ -1,5 +1,6 @@
 /* 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
@@ -19,6 +20,7 @@
 /* Based on error.c and error.h,
    written by David MacKenzie <address@hidden>.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <stdarg.h>
Index: src/conflicts.c
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.c,v
retrieving revision 1.112
diff -p -u -r1.112 conflicts.c
--- src/conflicts.c     18 Nov 2005 18:16:44 -0000      1.112
+++ src/conflicts.c     9 Dec 2005 23:41:15 -0000
@@ -20,6 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <bitset.h>
Index: src/derives.c
===================================================================
RCS file: /cvsroot/bison/bison/src/derives.c,v
retrieving revision 1.44
diff -p -u -r1.44 derives.c
--- src/derives.c       14 May 2005 06:49:47 -0000      1.44
+++ src/derives.c       9 Dec 2005 23:41:15 -0000
@@ -1,7 +1,7 @@
 /* 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.
 
@@ -20,7 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include "getargs.h"
Index: src/files.c
===================================================================
RCS file: /cvsroot/bison/bison/src/files.c,v
retrieving revision 1.93
diff -p -u -r1.93 files.c
--- src/files.c 2 Oct 2005 17:44:49 -0000       1.93
+++ src/files.c 9 Dec 2005 23:41:15 -0000
@@ -20,7 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <error.h>
Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.64
diff -p -u -r1.64 getargs.c
--- src/getargs.c       27 Sep 2005 06:08:27 -0000      1.64
+++ src/getargs.c       9 Dec 2005 23:41:15 -0000
@@ -20,6 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <argmatch.h>
Index: src/gram.c
===================================================================
RCS file: /cvsroot/bison/bison/src/gram.c,v
retrieving revision 1.57
diff -p -u -r1.57 gram.c
--- src/gram.c  5 Oct 2005 06:39:08 -0000       1.57
+++ src/gram.c  9 Dec 2005 23:41:15 -0000
@@ -1,7 +1,7 @@
 /* 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.
 
@@ -20,7 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <quotearg.h>
Index: src/lalr.c
===================================================================
RCS file: /cvsroot/bison/bison/src/lalr.c,v
retrieving revision 1.105
diff -p -u -r1.105 lalr.c
--- src/lalr.c  5 Oct 2005 06:39:08 -0000       1.105
+++ src/lalr.c  9 Dec 2005 23:41:15 -0000
@@ -1,6 +1,6 @@
 /* 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.
@@ -25,6 +25,7 @@
    which rules need look-ahead in each state, and which look-ahead
    tokens they accept.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <bitset.h>
Index: src/location.c
===================================================================
RCS file: /cvsroot/bison/bison/src/location.c,v
retrieving revision 1.5
diff -p -u -r1.5 location.c
--- src/location.c      14 May 2005 06:49:47 -0000      1.5
+++ src/location.c      9 Dec 2005 23:41:15 -0000
@@ -1,5 +1,6 @@
 /* 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.
 
@@ -18,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <quotearg.h>
Index: src/main.c
===================================================================
RCS file: /cvsroot/bison/bison/src/main.c,v
retrieving revision 1.84
diff -p -u -r1.84 main.c
--- src/main.c  21 Sep 2005 19:54:48 -0000      1.84
+++ src/main.c  9 Dec 2005 23:41:15 -0000
@@ -20,7 +20,7 @@
    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>
Index: src/muscle_tab.c
===================================================================
RCS file: /cvsroot/bison/bison/src/muscle_tab.c,v
retrieving revision 1.37
diff -p -u -r1.37 muscle_tab.c
--- src/muscle_tab.c    9 Sep 2005 22:42:15 -0000       1.37
+++ src/muscle_tab.c    9 Dec 2005 23:41:15 -0000
@@ -20,6 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <hash.h>
Index: src/nullable.c
===================================================================
RCS file: /cvsroot/bison/bison/src/nullable.c,v
retrieving revision 1.46
diff -p -u -r1.46 nullable.c
--- src/nullable.c      14 May 2005 06:49:47 -0000      1.46
+++ src/nullable.c      9 Dec 2005 23:41:15 -0000
@@ -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"
Index: src/output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.241
diff -p -u -r1.241 output.c
--- src/output.c        5 Oct 2005 06:39:08 -0000       1.241
+++ src/output.c        9 Dec 2005 23:41:15 -0000
@@ -20,7 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <error.h>
Index: src/parse-gram.y
===================================================================
RCS file: /cvsroot/bison/bison/src/parse-gram.y,v
retrieving revision 1.63
diff -p -u -r1.63 parse-gram.y
--- src/parse-gram.y    9 Dec 2005 22:43:00 -0000       1.63
+++ src/parse-gram.y    9 Dec 2005 23:41:15 -0000
@@ -20,6 +20,7 @@
    02110-1301  USA
 */
 
+#include <config.h>
 #include "system.h"
 
 #include "complain.h"
Index: src/print.c
===================================================================
RCS file: /cvsroot/bison/bison/src/print.c,v
retrieving revision 1.97
diff -p -u -r1.97 print.c
--- src/print.c 14 May 2005 06:49:48 -0000      1.97
+++ src/print.c 9 Dec 2005 23:41:15 -0000
@@ -1,6 +1,6 @@
 /* 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.
@@ -20,7 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <bitset.h>
Index: src/print_graph.c
===================================================================
RCS file: /cvsroot/bison/bison/src/print_graph.c,v
retrieving revision 1.59
diff -p -u -r1.59 print_graph.c
--- src/print_graph.c   24 Jul 2005 07:24:22 -0000      1.59
+++ src/print_graph.c   9 Dec 2005 23:41:15 -0000
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <quotearg.h>
Index: src/reader.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.c,v
retrieving revision 1.239
diff -p -u -r1.239 reader.c
--- src/reader.c        2 Oct 2005 17:44:49 -0000       1.239
+++ src/reader.c        9 Dec 2005 23:41:15 -0000
@@ -20,6 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <quotearg.h>
Index: src/reduce.c
===================================================================
RCS file: /cvsroot/bison/bison/src/reduce.c,v
retrieving revision 1.86
diff -p -u -r1.86 reduce.c
--- src/reduce.c        5 Oct 2005 06:39:08 -0000       1.86
+++ src/reduce.c        9 Dec 2005 23:41:15 -0000
@@ -1,7 +1,7 @@
 /* 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.
 
@@ -27,6 +27,7 @@
 /* Don't eliminate unreachable terminals: They may be used by the
    user's parser.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <bitset.h>
Index: src/relation.c
===================================================================
RCS file: /cvsroot/bison/bison/src/relation.c,v
retrieving revision 1.13
diff -p -u -r1.13 relation.c
--- src/relation.c      22 Jul 2005 21:56:20 -0000      1.13
+++ src/relation.c      9 Dec 2005 23:41:15 -0000
@@ -18,6 +18,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <bitsetv.h>
Index: src/state.c
===================================================================
RCS file: /cvsroot/bison/bison/src/state.c,v
retrieving revision 1.37
diff -p -u -r1.37 state.c
--- src/state.c 9 Nov 2005 15:48:05 -0000       1.37
+++ src/state.c 9 Dec 2005 23:41:15 -0000
@@ -19,7 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <hash.h>
Index: src/symlist.c
===================================================================
RCS file: /cvsroot/bison/bison/src/symlist.c,v
retrieving revision 1.12
diff -p -u -r1.12 symlist.c
--- src/symlist.c       12 Jul 2005 15:58:49 -0000      1.12
+++ src/symlist.c       9 Dec 2005 23:41:15 -0000
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include "complain.h"
Index: src/symtab.c
===================================================================
RCS file: /cvsroot/bison/bison/src/symtab.c,v
retrieving revision 1.66
diff -p -u -r1.66 symtab.c
--- src/symtab.c        16 Sep 2005 19:50:07 -0000      1.66
+++ src/symtab.c        9 Dec 2005 23:41:15 -0000
@@ -20,7 +20,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <hash.h>
Index: src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.72
diff -p -u -r1.72 system.h
--- src/system.h        9 Nov 2005 15:48:05 -0000       1.72
+++ src/system.h        9 Dec 2005 23:41:15 -0000
@@ -20,10 +20,6 @@
 #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>
Index: src/tables.c
===================================================================
RCS file: /cvsroot/bison/bison/src/tables.c,v
retrieving revision 1.29
diff -p -u -r1.29 tables.c
--- src/tables.c        27 Sep 2005 06:08:27 -0000      1.29
+++ src/tables.c        9 Dec 2005 23:41:16 -0000
@@ -20,7 +20,7 @@
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-
+#include <config.h>
 #include "system.h"
 
 #include <bitsetv.h>
Index: src/uniqstr.c
===================================================================
RCS file: /cvsroot/bison/bison/src/uniqstr.c,v
retrieving revision 1.6
diff -p -u -r1.6 uniqstr.c
--- src/uniqstr.c       24 Jul 2005 07:24:22 -0000      1.6
+++ src/uniqstr.c       9 Dec 2005 23:41:16 -0000
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <error.h>
Index: src/vcg.c
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.c,v
retrieving revision 1.21
diff -p -u -r1.21 vcg.c
--- src/vcg.c   24 Jul 2005 07:24:22 -0000      1.21
+++ src/vcg.c   9 Dec 2005 23:41:16 -0000
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include <quotearg.h>
--- /dev/null   2005-09-24 22:00:15.000000000 -0700
+++ src/scan-gram-c.c   2005-12-09 15:16:44.000000000 -0800
@@ -0,0 +1,2 @@
+#include <config.h>
+#include "scan-gram.c"
--- /dev/null   2005-09-24 22:00:15.000000000 -0700
+++ src/scan-skel-c.c   2005-12-09 15:16:46.000000000 -0800
@@ -0,0 +1,2 @@
+#include <config.h>
+#include "scan-skel.c"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]