mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-22 21:37:58 +02:00
commit bash-20160701 snapshot
This commit is contained in:
@@ -11306,3 +11306,27 @@ execute_cmd.c
|
||||
- param_expand: when expanding $* in a context where splitting is not
|
||||
desired (pflags & PF_ASSIGNRHS), make sure to quote the word and the
|
||||
included separators. Reported by Dan Douglas <ormaaj@gmail.com>
|
||||
|
||||
6/30
|
||||
----
|
||||
configure.ac
|
||||
- release version is now `beta2'
|
||||
|
||||
execute_cmd.c
|
||||
- execute_simple_command: even if already_making_children is non-zero,
|
||||
don't call wait_for if last_made_pid == NO_PID. Indirectly inspired
|
||||
by report from Nicolas Vivet <nicolas@nzx.io>
|
||||
|
||||
7/2
|
||||
---
|
||||
subst.c
|
||||
- expand_word_internal: when adding an IFS character to the accumulated
|
||||
string, don't quote it if word expansion is not going to be
|
||||
performed ((word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0) in the
|
||||
default case. This was already the case everwhere else, when we did
|
||||
`goto add_ifs_character;'. Fixes bug reported by Ibrahim M. Ghazal
|
||||
<imgx64@gmail.com>
|
||||
|
||||
subst.[ch],arrayfunc.c
|
||||
- string_list_dollar_at: now takes a new third argument, currently
|
||||
reserved for future use; changed callers and declaration
|
||||
|
||||
+2
-2
@@ -1087,7 +1087,7 @@ array_value_internal (s, quoted, flags, rtype, indp)
|
||||
free (temp);
|
||||
}
|
||||
else /* ${name[@]} or unquoted ${name[*]} */
|
||||
retval = string_list_dollar_at (l, quoted); /* XXX - leak here */
|
||||
retval = string_list_dollar_at (l, quoted, 0); /* XXX - leak here */
|
||||
|
||||
dispose_words (l);
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ array_keys (s, quoted)
|
||||
free (temp);
|
||||
}
|
||||
else /* ${!name[@]} or unquoted ${!name[*]} */
|
||||
retval = string_list_dollar_at (l, quoted);
|
||||
retval = string_list_dollar_at (l, quoted, 0);
|
||||
|
||||
dispose_words (l);
|
||||
return retval;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 4.4, version 4.079.
|
||||
# From configure.ac for Bash 4.4, version 4.080.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for bash 4.4-rc2.
|
||||
# Generated by GNU Autoconf 2.69 for bash 4.4-beta2.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -581,8 +581,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='4.4-rc2'
|
||||
PACKAGE_STRING='bash 4.4-rc2'
|
||||
PACKAGE_VERSION='4.4-beta2'
|
||||
PACKAGE_STRING='bash 4.4-beta2'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1393,7 +1393,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 4.4-rc2 to adapt to many kinds of systems.
|
||||
\`configure' configures bash 4.4-beta2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1458,7 +1458,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 4.4-rc2:";;
|
||||
short | recursive ) echo "Configuration of bash 4.4-beta2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1651,7 +1651,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 4.4-rc2
|
||||
bash configure 4.4-beta2
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2360,7 +2360,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 4.4-rc2, which was
|
||||
It was created by bash $as_me 4.4-beta2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2754,7 +2754,7 @@ ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=4.4
|
||||
RELSTATUS=rc2
|
||||
RELSTATUS=beta2
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -16666,7 +16666,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bash $as_me 4.4-rc2, which was
|
||||
This file was extended by bash $as_me 4.4-beta2, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -16732,7 +16732,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
bash config.status 4.4-rc2
|
||||
bash config.status 4.4-beta2
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+2
-2
@@ -21,10 +21,10 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_REVISION([for Bash 4.4, version 4.079])dnl
|
||||
AC_REVISION([for Bash 4.4, version 4.080])dnl
|
||||
|
||||
define(bashvers, 4.4)
|
||||
define(relstatus, rc2)
|
||||
define(relstatus, beta2)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
|
||||
+3
-1
@@ -836,7 +836,9 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
|
||||
#if !defined (JOB_CONTROL)
|
||||
/* Do not wait for asynchronous processes started from
|
||||
startup files. */
|
||||
if (last_made_pid != last_asynchronous_pid)
|
||||
if (last_made_pid != NO_PID && last_made_pid != last_asynchronous_pid)
|
||||
#else
|
||||
if (last_made_pid != NO_PID)
|
||||
#endif
|
||||
/* When executing a shell function that executes other
|
||||
commands, this causes the last simple command in
|
||||
|
||||
@@ -499,5 +499,34 @@ extern int locale_mb_cur_max; /* XXX */
|
||||
\
|
||||
goto add_string
|
||||
|
||||
# define SADD_MBCHAR_BODY(_dst, _src, _si, _srcsize) \
|
||||
\
|
||||
int i; \
|
||||
mbstate_t state_bak; \
|
||||
size_t mblength; \
|
||||
\
|
||||
i = is_basic (*((_src) + (_si))); \
|
||||
if (i) \
|
||||
mblength = 1; \
|
||||
else \
|
||||
{ \
|
||||
state_bak = state; \
|
||||
mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \
|
||||
} \
|
||||
if (mblength == (size_t)-1 || mblength == (size_t)-2) \
|
||||
{ \
|
||||
state = state_bak; \
|
||||
mblength = 1; \
|
||||
} \
|
||||
if (mblength < 1) \
|
||||
mblength = 1; \
|
||||
\
|
||||
(_dst) = (char *)xmalloc (mblength + 1); \
|
||||
for (i = 0; i < mblength; i++) \
|
||||
(_dst)[i+1] = (_src)[(_si)++]; \
|
||||
(_dst)[mblength+1] = '\0'; \
|
||||
\
|
||||
goto add_string
|
||||
|
||||
#endif /* HANDLE_MULTIBYTE */
|
||||
#endif /* _SH_MBUTIL_H_ */
|
||||
|
||||
@@ -2514,9 +2514,10 @@ string_list_dollar_star (list)
|
||||
to quote the words in the list to preserve the positional parameters
|
||||
exactly. */
|
||||
char *
|
||||
string_list_dollar_at (list, quoted)
|
||||
string_list_dollar_at (list, quoted, flags)
|
||||
WORD_LIST *list;
|
||||
int quoted;
|
||||
int flags;
|
||||
{
|
||||
char *ifs, *ret;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
@@ -2613,7 +2614,7 @@ string_list_pos_params (pchar, list, quoted)
|
||||
string_list_dollar_star if the string is unquoted so we make sure that
|
||||
the elements of $@ are separated by the first character of $IFS for
|
||||
later splitting. */
|
||||
ret = string_list_dollar_at (list, quoted);
|
||||
ret = string_list_dollar_at (list, quoted, 0);
|
||||
else if (pchar == '@')
|
||||
ret = string_list_dollar_star (list);
|
||||
else
|
||||
@@ -8021,7 +8022,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
|
||||
temp = string_list_dollar_star (xlist);
|
||||
else
|
||||
{
|
||||
temp = string_list_dollar_at (xlist, quoted);
|
||||
temp = string_list_dollar_at (xlist, quoted, 0);
|
||||
if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
|
||||
*quoted_dollar_atp = 1;
|
||||
if (contains_dollar_at)
|
||||
@@ -8558,7 +8559,7 @@ param_expand (string, sindex, quoted, expanded_something,
|
||||
temp = string_list_dollar_star (list);
|
||||
else
|
||||
{
|
||||
temp = string_list_dollar_at (list, quoted);
|
||||
temp = string_list_dollar_at (list, quoted, 0);
|
||||
if (quoted == 0 && (ifs_is_set == 0 || ifs_is_null))
|
||||
tflag |= W_SPLITSPACE;
|
||||
/* If we're not quoted but we still don't want word splitting, make
|
||||
@@ -8626,7 +8627,7 @@ param_expand (string, sindex, quoted, expanded_something,
|
||||
performed? Even when IFS is not the default, posix seems to imply
|
||||
that we behave like unquoted $* ? Maybe we should use PF_NOSPLIT2
|
||||
here. */
|
||||
temp = string_list_dollar_at (list, (pflags & PF_ASSIGNRHS) ? (quoted|Q_DOUBLE_QUOTES) : quoted);
|
||||
temp = string_list_dollar_at (list, (pflags & PF_ASSIGNRHS) ? (quoted|Q_DOUBLE_QUOTES) : quoted, 0);
|
||||
|
||||
tflag |= W_DOLLARAT;
|
||||
dispose_words (list);
|
||||
@@ -9419,7 +9420,7 @@ add_twochars:
|
||||
/* Testing quoted_dollar_at makes sure that "$@" is
|
||||
split correctly when $IFS does not contain a space. */
|
||||
temp = quoted_dollar_at
|
||||
? string_list_dollar_at (list, Q_DOUBLE_QUOTES)
|
||||
? string_list_dollar_at (list, Q_DOUBLE_QUOTES, 0)
|
||||
: string_list (quote_list (list));
|
||||
dispose_words (list);
|
||||
goto add_string;
|
||||
@@ -9519,7 +9520,7 @@ add_twochars:
|
||||
default:
|
||||
/* This is the fix for " $@ " */
|
||||
add_ifs_character:
|
||||
if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c)))
|
||||
if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c) && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0))
|
||||
{
|
||||
if (string[sindex]) /* from old goto dollar_add_string */
|
||||
sindex++;
|
||||
|
||||
@@ -104,7 +104,7 @@ extern char *string_list __P((WORD_LIST *));
|
||||
extern char *string_list_dollar_star __P((WORD_LIST *));
|
||||
|
||||
/* Expand $@ into a single string, obeying POSIX rules. */
|
||||
extern char *string_list_dollar_at __P((WORD_LIST *, int));
|
||||
extern char *string_list_dollar_at __P((WORD_LIST *, int, int));
|
||||
|
||||
/* Turn the positional paramters into a string, understanding quoting and
|
||||
the various subtleties of using the first character of $IFS as the
|
||||
|
||||
Reference in New Issue
Block a user