summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-10-08 12:12:48 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2010-10-08 12:13:04 -0700
commit8ff146cd31d887f9bb28ec5f96bffcad4b4057f7 (patch)
tree9d9838b3cc78218544a97844c7f5526752bd4765
parent95aed8db15a0bb0f7819bf77586d0cf6812ffdfd (diff)
downloadbison-8ff146cd31d887f9bb28ec5f96bffcad4b4057f7.tar.gz
Fix portability problem on OpenBSD 4.7.
Jim Meyering reported this in <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>. * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h, not _STDLIB_H. EXIT_SUCCESS has been defined by the standard for quite some time. * src/parse-gram.c, src/parse-gram.h: Regenerate. * tests/regression.at: Tamper with the renamed witness.
-rw-r--r--ChangeLog10
-rw-r--r--data/yacc.c16
-rw-r--r--src/parse-gram.c20
-rw-r--r--src/parse-gram.h2
-rw-r--r--tests/regression.at6
5 files changed, 32 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 65a7c029..05278350 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
+ Fix portability problem on OpenBSD 4.7.
+
+ Jim Meyering reported this in
+ <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
+ * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
+ not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
+ for quite some time.
+ * src/parse-gram.c, src/parse-gram.h: Regenerate.
+ * tests/regression.at: Tamper with the renamed witness.
+
Adjust to recent changes to gnulib bootstrap.
* .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
diff --git a/data/yacc.c b/data/yacc.c
index 28a2b238..e41e2e9c 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -419,10 +419,10 @@ typedef short int yytype_int16;
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && ]b4_c_modern[
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && ]b4_c_modern[
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -446,23 +446,23 @@ typedef short int yytype_int16;
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && ]b4_c_modern[
+# if ! defined malloc && ! defined EXIT_SUCCESS && ]b4_c_modern[
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && ]b4_c_modern[
+# if ! defined free && ! defined EXIT_SUCCESS && ]b4_c_modern[
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
diff --git a/src/parse-gram.c b/src/parse-gram.c
index e5713416..df7ed1f4 100644
--- a/src/parse-gram.c
+++ b/src/parse-gram.c
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.4.516-804e. */
+/* A Bison parser, made by GNU Bison 2.4.533-95aed. */
/* Implementation for Bison's Yacc-like parsers in C
@@ -45,7 +45,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.516-804e"
+#define YYBISON_VERSION "2.4.533-95aed"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -472,11 +472,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -499,24 +499,24 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
diff --git a/src/parse-gram.h b/src/parse-gram.h
index d8eea03c..2f5654c6 100644
--- a/src/parse-gram.h
+++ b/src/parse-gram.h
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.4.516-804e. */
+/* A Bison parser, made by GNU Bison 2.4.533-95aed. */
/* Interface for Bison's Yacc-like parsers in C
diff --git a/tests/regression.at b/tests/regression.at
index ceb18b94..b3fdc29f 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -1367,11 +1367,11 @@ AT_DATA_GRAMMAR([input.y],
large enough to overflow size_t. */
#define YYSIZE_T unsigned char
- /* Bring in malloc and set _STDLIB_H so yacc.c doesn't try to
+ /* Bring in malloc and set EXIT_SUCCESS so yacc.c doesn't try to
provide a malloc prototype using our YYSIZE_T. */
#include <stdlib.h>
- #ifndef _STDLIB_H
- # define _STDLIB_H 1
+ #ifndef EXIT_SUCCESS
+ # define EXIT_SUCCESS 0
#endif
/* Max depth is usually much smaller than YYSTACK_ALLOC_MAXIMUM, and