commit bash-20181214 snapshot

This commit is contained in:
Chet Ramey
2018-12-17 14:53:06 -05:00
parent 8bf3cfef2d
commit ab8ded9c30
5 changed files with 29 additions and 7 deletions
+17
View File
@@ -4875,3 +4875,20 @@ variables.c
- assign_in_env: don't allow namerefs in temporary environment
assignments to create variables with invalid names for export. Fixes
bug reported by Grisha Levit <grishalevit@gmail.com>
12/14
-----
parse.y
- don't change last_command_exit_value in the 'error yacc_EOF' production
if the parser sets it to something non-zero; just make sure it
indicates an error. Fixes problem with unexpected EOF in eval
reported by Martijn Dekker <martijn@inlv.org>
12/17
-----
expr.c
- exp2 -> expmuldiv
lib/sh/smatch.c
- fnmatch: add extern declaration if FNMATCH_EQUIV_FALLBACK is being
used
+2 -2
View File
@@ -336,9 +336,9 @@ int flags;
} else if (flags & OPT_DEV)
printf("%d\n", st->st_dev);
else if (flags & OPT_INO)
printf("%d\n", st->st_ino);
printf("%lu\n", (unsigned long)st->st_ino);
else if (flags & OPT_FID)
printf("%d:%ld\n", st->st_dev, st->st_ino);
printf("%d:%lu\n", st->st_dev, (unsigned long)st->st_ino);
else if (flags & OPT_NLINK)
printf("%d\n", st->st_nlink);
else if (flags & OPT_LNKNAM) {
+4 -4
View File
@@ -214,7 +214,7 @@ static intmax_t exp5 __P((void));
static intmax_t exp4 __P((void));
static intmax_t expshift __P((void));
static intmax_t exp3 __P((void));
static intmax_t exp2 __P((void));
static intmax_t expmuldiv __P((void));
static intmax_t exppower __P((void));
static intmax_t exp1 __P((void));
static intmax_t exp0 __P((void));
@@ -858,14 +858,14 @@ exp3 ()
{
register intmax_t val1, val2;
val1 = exp2 ();
val1 = expmuldiv ();
while ((curtok == PLUS) || (curtok == MINUS))
{
int op = curtok;
readtok ();
val2 = exp2 ();
val2 = expmuldiv ();
if (op == PLUS)
val1 += val2;
@@ -877,7 +877,7 @@ exp3 ()
}
static intmax_t
exp2 ()
expmuldiv ()
{
register intmax_t val1, val2;
#if defined (HAVE_IMAXDIV)
+4
View File
@@ -289,6 +289,10 @@ is_cclass (c, name)
extern char *mbsmbchar __P((const char *));
#if FNMATCH_EQUIV_FALLBACK
/* We don't include <fnmatch.h> in order to avoid namespace collisions; the
internal strmatch still uses the FNM_ constants. */
extern int fnmatch (const char *, const char *, int);
/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them
to fnmatch to see if wide characters c1 and c2 collate as members of the
same equivalence class. We can't really do this portably any other way */
+2 -1
View File
@@ -418,7 +418,8 @@ inputunit: simple_list simple_list_terminator
/* EOF after an error. Do ignoreeof or not. Really
only interesting in non-interactive shells */
global_command = (COMMAND *)NULL;
last_command_exit_value = 1;
if (last_command_exit_value == 0)
last_command_exit_value = EX_BADUSAGE; /* force error return */
handle_eof_input_unit ();
if (interactive && parse_and_execute_level == 0)
{