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.
This commit is contained in:
Paul Eggert
2010-10-08 12:12:48 -07:00
parent 95aed8db15
commit 8ff146cd31
5 changed files with 32 additions and 22 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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