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

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