From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 13 Oct 2006 05:00:26 +0000 (+0000)
Subject: * bootstrap.conf (gnulib_modules): Add config-h.
X-Git-Tag: v2.3b~267
X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/231ed89af1eaff303a22f72aeb1c2c0cf5e25c21

* bootstrap.conf (gnulib_modules): Add config-h.
* djgpp/subpipe.c: Include <config.h> unconditionally; don't
worry about HAVE_CONFIG_H.
* lib/abitset.c: Likewise.
* lib/bitset.c: Likewise.
* lib/bitset_stats.c: Likewise.
* lib/bitsetv-print.c: Likewise.
* lib/bitsetv.c: Likewise.
* lib/ebitset.c: Likewise.
* lib/get-errno.c: Likewise.
* lib/lbitset.c: Likewise.
* lib/subpipe.c: Likewise.
* lib/timevar.c: Likewise.
* lib/vbitset.c: Likewise.
* lib/bitset.c: Include "bitset.h" first, to test interface.
* lib/bitset_stats.c: Include "bitset_stats.h" first.
* lib/bitsetv-print.c: Include "bitsetv-print.h" first.
* lib/bitsetv.c: Include "bitsetv.h" first.
* lib/get-errno.c: Include "get-errno.h" first.
* m4/.cvsignore: Add config-h.m4.
* tests/actions.at (Default %printer and %destructor for ...):
Adjust expected line numbers in output to reflect removal of #if
HAVE_CONFIG_H lines.
* tests/glr-regression.at (Missed %merge type warnings when ...):
Likewise.
* tests/regression.at (Braced code in declaration in rules section):
Likewise.
* tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
* tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
Include <config.h> unconditionally.
---

diff --git a/ChangeLog b/ChangeLog
index 4eeb51f4..4f6b5a02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,36 @@
 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
 
+	* bootstrap.conf (gnulib_modules): Add config-h.
+	* djgpp/subpipe.c: Include <config.h> unconditionally; don't
+	worry about HAVE_CONFIG_H.
+	* lib/abitset.c: Likewise.
+	* lib/bitset.c: Likewise.
+	* lib/bitset_stats.c: Likewise.
+	* lib/bitsetv-print.c: Likewise.
+	* lib/bitsetv.c: Likewise.
+	* lib/ebitset.c: Likewise.
+	* lib/get-errno.c: Likewise.
+	* lib/lbitset.c: Likewise.
+	* lib/subpipe.c: Likewise.
+	* lib/timevar.c: Likewise.
+	* lib/vbitset.c: Likewise.
+	* lib/bitset.c: Include "bitset.h" first, to test interface.
+	* lib/bitset_stats.c: Include "bitset_stats.h" first.
+	* lib/bitsetv-print.c: Include "bitsetv-print.h" first.
+	* lib/bitsetv.c: Include "bitsetv.h" first.
+	* lib/get-errno.c: Include "get-errno.h" first.
+	* m4/.cvsignore: Add config-h.m4.
+	* tests/actions.at (Default %printer and %destructor for ...):
+	Adjust expected line numbers in output to reflect removal of #if
+	HAVE_CONFIG_H lines.
+	* tests/glr-regression.at (Missed %merge type warnings when ...):
+	Likewise.
+	* tests/regression.at (Braced code in declaration in rules section):
+	Likewise.
+	* tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
+	* tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
+	Include <config.h> unconditionally.
+
 	* bootstrap: Sync from coreutils, as follows:
 
 	2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
diff --git a/bootstrap.conf b/bootstrap.conf
index aff3c023..28e1894b 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -20,7 +20,7 @@
 
 # gnulib modules used by this package.
 gnulib_modules='
-	argmatch configmake dirname error extensions fopen-safer
+	argmatch config-h configmake dirname error extensions fopen-safer
 	getopt gettext hash inttypes malloc mbswidth obstack quote
 	quotearg stdbool stpcpy strerror strtoul strverscmp unistd
 	unistd-safer unlocked-io verify xalloc xalloc-die xstrndup
diff --git a/djgpp/subpipe.c b/djgpp/subpipe.c
index 33e2a382..96117b9a 100644
--- a/djgpp/subpipe.c
+++ b/djgpp/subpipe.c
@@ -19,9 +19,7 @@
 /* Written by Juan Manuel Guerrero <juan.guerrero@gmx.de>. */
 
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "subpipe.h"
 
diff --git a/lib/abitset.c b/lib/abitset.c
index 17c0a4af..40ed871d 100644
--- a/lib/abitset.c
+++ b/lib/abitset.c
@@ -16,9 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "abitset.h"
 #include <stddef.h>
diff --git a/lib/bitset.c b/lib/bitset.c
index 2924567e..792c4204 100644
--- a/lib/bitset.c
+++ b/lib/bitset.c
@@ -16,13 +16,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
+
+#include "bitset.h"
 
 #include <stdlib.h>
 #include <string.h>
-#include "bitset.h"
 #include "abitset.h"
 #include "lbitset.h"
 #include "ebitset.h"
diff --git a/lib/bitset_stats.c b/lib/bitset_stats.c
index 7b7fb341..8dc693e2 100644
--- a/lib/bitset_stats.c
+++ b/lib/bitset_stats.c
@@ -23,16 +23,15 @@
    operations get vectored through here and we then call the appropriate
    routines.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
+
+#include "bitset_stats.h"
 
 #include "bbitset.h"
 #include "abitset.h"
 #include "ebitset.h"
 #include "lbitset.h"
 #include "vbitset.h"
-#include "bitset_stats.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/lib/bitsetv-print.c b/lib/bitsetv-print.c
index 00838713..e843caad 100644
--- a/lib/bitsetv-print.c
+++ b/lib/bitsetv-print.c
@@ -15,13 +15,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
-#include <stdlib.h>
 #include "bitsetv-print.h"
 
+#include <stdlib.h>
+
 /*--------------------------------------------------------.
 | Display the MATRIX array of SIZE bitsets of size SIZE.  |
 `--------------------------------------------------------*/
diff --git a/lib/bitsetv.c b/lib/bitsetv.c
index ae79853c..b26e8971 100644
--- a/lib/bitsetv.c
+++ b/lib/bitsetv.c
@@ -15,13 +15,12 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
-#include <stdlib.h>
 #include "bitsetv.h"
 
+#include <stdlib.h>
+
 
 /* Create a vector of N_VECS bitsets, each of N_BITS, and of
    type TYPE.  */
diff --git a/lib/ebitset.c b/lib/ebitset.c
index cedf0e28..ceebde25 100644
--- a/lib/ebitset.c
+++ b/lib/ebitset.c
@@ -16,11 +16,10 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "ebitset.h"
+
 #include "obstack.h"
 #include <stdlib.h>
 #include <string.h>
diff --git a/lib/get-errno.c b/lib/get-errno.c
index 8e8ef582..56876de2 100644
--- a/lib/get-errno.c
+++ b/lib/get-errno.c
@@ -18,14 +18,12 @@
 
 /* Written by Paul Eggert.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <errno.h>
+#include <config.h>
 
 #include "get-errno.h"
 
+#include <errno.h>
+
 /* Get and set errno.  A source file that needs to set or get errno,
    but doesn't need to test for specific errno values, can use these
    functions to avoid namespace pollution.  For example, a file that
diff --git a/lib/lbitset.c b/lib/lbitset.c
index 7d47a052..db0621e6 100644
--- a/lib/lbitset.c
+++ b/lib/lbitset.c
@@ -16,11 +16,10 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "lbitset.h"
+
 #include "obstack.h"
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/lib/subpipe.c b/lib/subpipe.c
index 3b7fb31a..b9702d2b 100644
--- a/lib/subpipe.c
+++ b/lib/subpipe.c
@@ -19,9 +19,7 @@
 /* Written by Paul Eggert <eggert@twinsun.com>
    and Florian Krohm <florian@edamail.fishkill.ibm.com>.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "subpipe.h"
 
diff --git a/lib/timevar.c b/lib/timevar.c
index d9b533ce..51a55c6c 100644
--- a/lib/timevar.c
+++ b/lib/timevar.c
@@ -16,9 +16,7 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #if IN_GCC
 
diff --git a/lib/vbitset.c b/lib/vbitset.c
index d0fe30f6..bec2aec4 100644
--- a/lib/vbitset.c
+++ b/lib/vbitset.c
@@ -16,11 +16,10 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "vbitset.h"
+
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/m4/.cvsignore b/m4/.cvsignore
index dd41312e..40a549f8 100644
--- a/m4/.cvsignore
+++ b/m4/.cvsignore
@@ -1,5 +1,6 @@
 absolute-header.m4
 argmatch.m4
+config-h.m4
 dirname.m4
 dos.m4
 double-slash-root.m4
diff --git a/tests/actions.at b/tests/actions.at
index aa418b1f..21244c6f 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -896,7 +896,7 @@ Default destructor for 'S' @ 1.
 ]],
 [[Starting parse
 Entering state 0
-Reducing stack by rule 1 (line 37):
+Reducing stack by rule 1 (line 35):
 -> $$ = nterm start (1.1-1.1: Default printer for 'S' @ 1)
 Stack now 0
 Entering state 1
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 9f258d7d..d4d1b231 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -11,7 +11,7 @@ CC='@CC@'
 CFLAGS='@O0CFLAGS@ @WARNING_CFLAGS@ @WERROR_CFLAGS@'
 
 # We need `config.h'.
-CPPFLAGS="-DHAVE_CONFIG_H=1 -I$abs_top_builddir/lib @CPPFLAGS@"
+CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
 
 # Is the compiler GCC?
 GCC='@GCC@'
diff --git a/tests/glr-regression.at b/tests/glr-regression.at
index 31a60169..9a0f01c0 100644
--- a/tests/glr-regression.at
+++ b/tests/glr-regression.at
@@ -1760,10 +1760,10 @@ main (void)
 ]])
 
 AT_CHECK([[bison -o glr-regr18.c glr-regr18.y]], 1, [],
-[glr-regr18.y:28.18-24: result type clash on merge function `merge': <type2> != <type1>
-glr-regr18.y:27.18-24: previous declaration
-glr-regr18.y:29.13-19: result type clash on merge function `merge': <type3> != <type2>
-glr-regr18.y:28.18-24: previous declaration
+[glr-regr18.y:26.18-24: result type clash on merge function `merge': <type2> != <type1>
+glr-regr18.y:25.18-24: previous declaration
+glr-regr18.y:27.13-19: result type clash on merge function `merge': <type3> != <type2>
+glr-regr18.y:26.18-24: previous declaration
 ])
 
 AT_CLEANUP
diff --git a/tests/local.at b/tests/local.at
index 55ba8249..b9cace01 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -64,7 +64,7 @@ m4_pushdef([AT_PURE_AND_LOC_IF],
 m4_pushdef([AT_GLR_OR_PARAM_IF],
 [m4_bmatch([$3], [%glr-parser\|%parse-param], [$1], [$2])])
 m4_pushdef([AT_NAME_PREFIX],
-[m4_bmatch([$3], [%name-prefix=".*"], 
+[m4_bmatch([$3], [%name-prefix=".*"],
            [m4_bregexp([$3], [name-prefix="\([^"]*\)"], [\1])],
            [yy])])
 # yyerror receives the location if %location & %pure & (%glr or %parse-param).
@@ -148,13 +148,11 @@ m4_popdef([AT_LALR1_CC_IF])
 # meant to be compiled.
 m4_define([AT_DATA_GRAMMAR_PROLOGUE],
 [[%{
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-  /* We don't need perfect functions for these tests. */
-# undef malloc
-# undef memcmp
-# undef realloc
-#endif
+#include <config.h>
+/* We don't need perfect functions for these tests. */
+#undef malloc
+#undef memcmp
+#undef realloc
 %}]
 ])
 
diff --git a/tests/regression.at b/tests/regression.at
index 40a18080..6a0703ae 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -1105,7 +1105,7 @@ AT_PARSER_CHECK([./input], 0,
 ]],
 [[Starting parse
 Entering state 0
-Reducing stack by rule 1 (line 22):
+Reducing stack by rule 1 (line 20):
 -> $$ = nterm start ()
 Stack now 0
 Entering state 1