diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | data/yacc.c | 16 | ||||
-rw-r--r-- | src/parse-gram.c | 20 | ||||
-rw-r--r-- | src/parse-gram.h | 2 | ||||
-rw-r--r-- | tests/regression.at | 6 |
5 files changed, 32 insertions, 22 deletions
@@ -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 |