commit bash-20161209 snapshot

This commit is contained in:
Chet Ramey
2016-12-13 12:06:27 -05:00
parent 99210c299b
commit a57ed9e90a
27 changed files with 230 additions and 59 deletions
+3 -1
View File
@@ -91,7 +91,9 @@ sh_stat (path, finfo)
}
if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0)
{
#if !defined (HAVE_DEV_FD)
/* If stating /dev/fd/n doesn't produce the same results as fstat of
FD N, then define DEV_FD_STAT_BROKEN */
#if !defined (HAVE_DEV_FD) || defined (DEV_FD_STAT_BROKEN)
intmax_t fd;
int r;
+4 -1
View File
@@ -228,7 +228,8 @@ sh_un_double_quote (string)
going through the shell parser, which will protect the internal
quoting characters. TABLE, if set, points to a map of the ascii code
set with char needing to be backslash-quoted if table[char]==1. FLAGS,
if 1, causes tildes to be quoted as well. */
if 1, causes tildes to be quoted as well. If FLAGS&2, backslash-quote
other shell blank characters. */
char *
sh_backslash_quote (string, table, flags)
@@ -273,6 +274,8 @@ sh_backslash_quote (string, table, flags)
/* Tildes are special at the start of a word or after a `:' or `='
(technically unquoted, but it doesn't make a difference in practice) */
*r++ = '\\';
else if ((flags&2) && shellblank((unsigned char)c))
*r++ = '\\';
*r++ = c;
}