mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
16
data/yacc.c
16
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
|
||||
|
||||
Reference in New Issue
Block a user