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.
(cherry picked from commit 8ff146cd31)

Conflicts:

	ChangeLog
	src/parse-gram.c
	src/parse-gram.h
This commit is contained in:
Paul Eggert
2010-10-08 12:12:48 -07:00
committed by Joel E. Denny
parent 86996fca10
commit ea6046b9f6
5 changed files with 182 additions and 169 deletions

View File

@@ -1,5 +1,15 @@
2010-10-08 Paul Eggert <eggert@cs.ucla.edu> 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. Adjust to recent changes to gnulib bootstrap.
* .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore: * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:

View File

@@ -418,10 +418,10 @@ typedef short int yytype_int16;
# define alloca _alloca # define alloca _alloca
# else # else
# define YYSTACK_ALLOC alloca # 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 */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# endif # endif
@@ -445,23 +445,23 @@ typedef short int yytype_int16;
# ifndef YYSTACK_ALLOC_MAXIMUM # ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif # endif
# if (defined __cplusplus && ! defined _STDLIB_H \ # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \ && ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H # ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
# endif # endif
# endif # endif
# ifndef YYMALLOC # ifndef YYMALLOC
# define YYMALLOC malloc # 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 */ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif
# ifndef YYFREE # ifndef YYFREE
# define YYFREE free # 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 */ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif # endif
# endif # endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,9 @@
/* A Bison parser, made by GNU Bison 2.4.1.206-8a8b-dirty. */ /* A Bison parser, made by GNU Bison 2.4.1.243-8699. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2010 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -161,7 +162,7 @@ typedef union YYSTYPE
{ {
/* Line 1725 of yacc.c */ /* Line 1725 of yacc.c */
#line 93 "parse-gram.y" #line 94 "parse-gram.y"
symbol *symbol; symbol *symbol;
symbol_list *list; symbol_list *list;
@@ -176,7 +177,7 @@ typedef union YYSTYPE
/* Line 1725 of yacc.c */ /* Line 1725 of yacc.c */
#line 180 "parse-gram.h" #line 181 "parse-gram.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */

View File

@@ -1375,11 +1375,11 @@ AT_DATA_GRAMMAR([input.y],
large enough to overflow size_t. */ large enough to overflow size_t. */
#define YYSIZE_T unsigned char #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. */ provide a malloc prototype using our YYSIZE_T. */
#include <stdlib.h> #include <stdlib.h>
#ifndef _STDLIB_H #ifndef EXIT_SUCCESS
# define _STDLIB_H 1 # define EXIT_SUCCESS 0
#endif #endif
/* Max depth is usually much smaller than YYSTACK_ALLOC_MAXIMUM, and /* Max depth is usually much smaller than YYSTACK_ALLOC_MAXIMUM, and