mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tests: fix regressions.
Exit status 63 is documented for version-mismatch.
* bootstrap.conf (gnulib_modules): Remove sysexits.
* src/system.h (EX_MISMATCH): Define.
* src/parse-gram.y (version_check): Use it instead of EX_CONFIG.
Missing includes.
* tests/calc.at, tests/named-refs.at: Include assert.h.
(cherry picked from commit 459a57a90f)
This commit is contained in:
@@ -25,7 +25,6 @@ gnulib_modules='
|
|||||||
mbswidth obstack perror pipe-posix progname
|
mbswidth obstack perror pipe-posix progname
|
||||||
quote quotearg realloc-posix
|
quote quotearg realloc-posix
|
||||||
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
||||||
sysexits
|
|
||||||
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
||||||
warnings xalloc xalloc-die xstrndup
|
warnings xalloc xalloc-die xstrndup
|
||||||
|
|
||||||
|
|||||||
@@ -134,8 +134,8 @@ sub calc_grammar ($$$)
|
|||||||
or die;
|
or die;
|
||||||
print $out <<EOF;
|
print $out <<EOF;
|
||||||
%{
|
%{
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|||||||
@@ -759,7 +759,7 @@ version_check (location const *loc, char const *version)
|
|||||||
{
|
{
|
||||||
complain_at (*loc, "require bison %s, but have %s",
|
complain_at (*loc, "require bison %s, but have %s",
|
||||||
version, PACKAGE_VERSION);
|
version, PACKAGE_VERSION);
|
||||||
exit (EX_CONFIG);
|
exit (EX_MISMATCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
typedef size_t uintptr_t;
|
typedef size_t uintptr_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sysexits.h>
|
// Version mismatch.
|
||||||
|
#define EX_MISMATCH 63
|
||||||
|
|
||||||
/*---------.
|
/*---------.
|
||||||
| Gnulib. |
|
| Gnulib. |
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ extern FILE *input;]AT_SKEL_CC_IF([[
|
|||||||
|
|
||||||
%code
|
%code
|
||||||
{
|
{
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if HAVE_UNISTD_H
|
#if HAVE_UNISTD_H
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ AT_SETUP([Tutorial calculator])
|
|||||||
AT_DATA_GRAMMAR([test.y],
|
AT_DATA_GRAMMAR([test.y],
|
||||||
[[
|
[[
|
||||||
%{
|
%{
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user