commit bash-20130920 snapshot

This commit is contained in:
Chet Ramey
2013-10-09 07:32:25 -04:00
parent 1101193a95
commit 783ca20f7f
23 changed files with 17958 additions and 67 deletions
+52
View File
@@ -1,3 +1,55 @@
This document details the changes between this version, bash-4.3-beta2, and the
previous version, bash-4.3-beta.
1. Changes to Bash
a. Fixed a bug that caused assignment to an unset variable using a negative
subscript to result in a segmentation fault.
b. Fixed a bug that caused assignment to a string variable using a negative
subscript to use the incorrect index.
c. Fixed a bug that caused some strings to be interpreted as invalid
extended globbing expressions when used with the help builtin.
d. Fixed a bug that caused an attempt to trap a signal whose disposition
cannot be changed to reference uninitialized memory.
e. Command completion now skips assignment statements preceding a command
name and completes the command.
f. Fixed a bug that caused `compgen -f' in a non-interactive shell to dump
core under certain circumstances.
g. Fixed a bug that caused the `read -N' to misbehave when the input stream
contains 0xff.
2. Changes to Readline
a. Changed message when an incremental search fails to include "failed" in
the prompt and display the entire search string instead of just the last
matching portion.
b. Fixed a bug that caused an arrow key typed to an incremental search prompt
to process the key sequence incorrectly.
3. New Features in Bash
a. The help builtin now attempts substring matching (as it did through
bash-4.2) if exact string matching fails.
b. The fc builtin now interprets -0 as the current command line.
c. Completing directory names containing shell variables now adds a trailing
slash if the expanded result is a directory.
4. New Features in Readline
a. rl_change_environment: new application-settable variable that controls
whether or not Readline modifies the environment (currently readline
modifies only LINES and COLUMNS).
------------------------------------------------------------------------------
This document details the changes between this version, bash-4.3-beta, and the
previous version, bash-4.3-alpha.
+7680
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -5253,3 +5253,26 @@ lib/readline/isearch.c
typeahead to be collected in `ibuffer' (input.c). If there is any,
make sure we still use the ESC as a prefix character. Bug and fix
from Mike Miller <mtmiller@ieee.org>
9/16
----
builtins/{caller,cd,kill,pushd,wait}.def
- builtin_usage(): make sure call to this sets return status to
EX_USAGE
9/18
----
terminal.c
- rl_change_environment: new application-settable variable; if non-
zero (the default), readline will modify LINES and COLUMNS in the
environment when it handles SIGWINCH
- _rl_get_screen_size: if rl_change_environment is non-zero, use setenv
to modify LINES and COLUMNS environment variables
readline.h
- rl_change_environment: new extern declaration for applications
9/22
----
configure.ac
- relstatus: bumped version to bash-4.3-beta2
+5273
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -335,6 +335,12 @@ unless the operating system does not provide the necessary support.
Set the default value of the EXTGLOB shell option described above
under *note The Shopt Builtin:: to be enabled.
`--enable-glob-asciirange-default'
Set the default value of the GLOBASCIIRANGES shell option described
above under *note The Shopt Builtin:: to be enabled. This
controls the behavior of character ranges when used in pattern
matching bracket expressions.
`--enable-help-builtin'
Include the `help' builtin, which displays help on shell builtins
and variables (*note Bash Builtins::).
+12
View File
@@ -110,6 +110,14 @@ gg. The brace expansion code now treats a failed sequence expansion as a
hh. Shells started to run process substitutions now run any trap set on EXIT.
ii. The help builtin now attempts substring matching (as it did through
bash-4.2) if exact string matching fails.
jj. The fc builtin now interprets -0 as the current command line.
kk. Completing directory names containing shell variables now adds a trailing
slash if the expanded result is a directory.
2. New Features in Readline
a. Readline is now more responsive to SIGHUP and other fatal signals when
@@ -165,6 +173,10 @@ n. New application-settable variable: rl_signal_event_hook; function that is
called when readline is reading terminal input and read(2) is interrupted
by a signal. Currently not called for SIGHUP or SIGTERM.
o. rl_change_environment: new application-settable variable that controls
whether or not Readline modifies the environment (currently readline
modifies only LINES and COLUMNS).
-------------------------------------------------------------------------------
This is a terse description of the new features added to bash-4.2 since
the release of bash-4.1. As always, the manual page (doc/bash.1) is
+10 -4
View File
@@ -110,11 +110,13 @@ gg. The brace expansion code now treats a failed sequence expansion as a
hh. Shells started to run process substitutions now run any trap set on EXIT.
ii. There is now a configure-time option to enable the globasciiranges option
by default.
ii. The help builtin now attempts substring matching (as it did through
bash-4.2) if exact string matching fails.
jj. The read builtin now checks its first variable argument for validity before
trying to read any input.
jj. The fc builtin now interprets -0 as the current command line.
kk. Completing directory names containing shell variables now adds a trailing
slash if the expanded result is a directory.
2. New Features in Readline
@@ -170,3 +172,7 @@ m. If the user-settable variable `history-size' is set to a value less than
n. New application-settable variable: rl_signal_event_hook; function that is
called when readline is reading terminal input and read(2) is interrupted
by a signal. Currently not called for SIGHUP or SIGTERM.
o. rl_change_environment: new application-settable variable that controls
whether or not Readline modifies the environment (currently readline
modifies only LINES and COLUMNS).
+1811
View File
File diff suppressed because it is too large Load Diff
+1799
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -1,7 +1,7 @@
@%:@! /bin/sh
@%:@ From configure.ac for Bash 4.3, version 4.059.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.69 for bash 4.3-beta.
@%:@ Generated by GNU Autoconf 2.69 for bash 4.3-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.3-beta'
PACKAGE_STRING='bash 4.3-beta'
PACKAGE_VERSION='4.3-beta2'
PACKAGE_STRING='bash 4.3-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.3-beta to adapt to many kinds of systems.
\`configure' configures bash 4.3-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.3-beta:";;
short | recursive ) echo "Configuration of bash 4.3-beta2:";;
esac
cat <<\_ACEOF
@@ -1650,7 +1650,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bash configure 4.3-beta
bash configure 4.3-beta2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2359,7 +2359,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.3-beta, which was
It was created by bash $as_me 4.3-beta2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2753,7 +2753,7 @@ ac_config_headers="$ac_config_headers config.h"
BASHVERS=4.3
RELSTATUS=beta
RELSTATUS=beta2
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -16539,7 +16539,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.3-beta, which was
This file was extended by bash $as_me 4.3-beta2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16605,7 +16605,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.3-beta
bash config.status 4.3-beta2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+19 -19
View File
@@ -15,57 +15,57 @@
'configure.ac'
],
{
'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
'AC_CANONICAL_TARGET' => 1,
'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_PATH_GUILE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_NLS' => 1,
'AC_FC_PP_DEFINE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'_AM_COND_ENDIF' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AM_PROG_MOC' => 1,
'AC_CONFIG_FILES' => 1,
'LT_INIT' => 1,
'include' => 1,
'AM_GNU_GETTEXT' => 1,
'LT_INIT' => 1,
'AM_PROG_AR' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AC_CANONICAL_BUILD' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AC_FC_PP_SRCEXT' => 1,
'AH_OUTPUT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_FC_PP_SRCEXT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_PROG_CC_C_O' => 1,
'm4_pattern_allow' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_POT_TOOLS' => 1,
+1 -1
View File
@@ -1,4 +1,4 @@
m4trace:configure.ac:29: -1- AC_INIT([bash], [4.3-beta], [bug-bash@gnu.org])
m4trace:configure.ac:29: -1- AC_INIT([bash], [4.3-beta2], [bug-bash@gnu.org])
m4trace:configure.ac:29: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:29: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:29: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+2 -1
View File
@@ -2,6 +2,7 @@ This file is caller.def, from which is created caller.c. It implements the
builtin "caller" in Bash.
Copyright (C) 2002-2008 Rocky Bernstein for Free Software Foundation, Inc.
Copyright (C) 2008-2013 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -121,7 +122,7 @@ caller_builtin (list)
{
sh_invalidnum (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
return (EXECUTION_SUCCESS);
+3 -3
View File
@@ -1,7 +1,7 @@
This file is cd.def, from which is created cd.c. It implements the
builtins "cd" and "pwd" in Bash.
Copyright (C) 1987-2011 Free Software Foundation, Inc.
Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -219,7 +219,7 @@ cd_builtin (list)
break;
default:
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
}
list = loptend;
@@ -404,7 +404,7 @@ pwd_builtin (list)
break;
default:
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
}
list = loptend;
+3 -3
View File
@@ -94,7 +94,7 @@ kill_builtin (list)
if (list == 0)
{
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
any_succeeded = listing = saw_signal = 0;
@@ -139,7 +139,7 @@ kill_builtin (list)
else if (ISOPTION (word, '?'))
{
builtin_usage ();
return (EXECUTION_SUCCESS);
return (EX_USAGE);
}
/* If this is a signal specification then process it. We only process
the first one seen; other arguments may signify process groups (e.g,
@@ -168,7 +168,7 @@ kill_builtin (list)
if (list == 0)
{
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
while (list)
+7 -7
View File
@@ -228,7 +228,7 @@ pushd_builtin (list)
{
sh_invalidnum (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
if (direction == '-')
@@ -245,7 +245,7 @@ pushd_builtin (list)
{
sh_invalidopt (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
else
break;
@@ -339,7 +339,7 @@ popd_builtin (list)
{
sh_invalidnum (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
which_word = list->word->word;
}
@@ -347,13 +347,13 @@ popd_builtin (list)
{
sh_invalidopt (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
else if (*list->word->word)
{
builtin_error (_("%s: invalid argument"), list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
else
break;
@@ -432,7 +432,7 @@ dirs_builtin (list)
{
sh_invalidnum (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
sign = (*list->word->word == '+') ? 1 : -1;
desired_index = get_dirstack_index (i, sign, &index_flag);
@@ -441,7 +441,7 @@ dirs_builtin (list)
{
sh_invalidopt (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
This file is wait.def, from which is created wait.c.
It implements the builtin "wait" in Bash.
Copyright (C) 1987-2012 Free Software Foundation, Inc.
Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -112,7 +112,7 @@ wait_builtin (list)
#endif
default:
builtin_usage ();
return (EXECUTION_FAILURE);
return (EX_USAGE);
}
}
list = loptend;
Vendored
+10 -10
View File
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac for Bash 4.3, version 4.059.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bash 4.3-beta.
# Generated by GNU Autoconf 2.69 for bash 4.3-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.3-beta'
PACKAGE_STRING='bash 4.3-beta'
PACKAGE_VERSION='4.3-beta2'
PACKAGE_STRING='bash 4.3-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.3-beta to adapt to many kinds of systems.
\`configure' configures bash 4.3-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.3-beta:";;
short | recursive ) echo "Configuration of bash 4.3-beta2:";;
esac
cat <<\_ACEOF
@@ -1650,7 +1650,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bash configure 4.3-beta
bash configure 4.3-beta2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2359,7 +2359,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.3-beta, which was
It was created by bash $as_me 4.3-beta2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2753,7 +2753,7 @@ ac_config_headers="$ac_config_headers config.h"
BASHVERS=4.3
RELSTATUS=beta
RELSTATUS=beta2
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -16539,7 +16539,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.3-beta, which was
This file was extended by bash $as_me 4.3-beta2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16605,7 +16605,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.3-beta
bash config.status 4.3-beta2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+1 -1
View File
@@ -24,7 +24,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_REVISION([for Bash 4.3, version 4.059])dnl
define(bashvers, 4.3)
define(relstatus, beta)
define(relstatus, beta2)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
+1210
View File
File diff suppressed because it is too large Load Diff
+11 -2
View File
@@ -1539,12 +1539,21 @@ The default value of @code{rl_catch_signals} is 1.
@end deftypevar
@deftypevar int rl_catch_sigwinch
If this variable is non-zero, Readline will install a signal handler for
@code{SIGWINCH}.
If this variable is set to a non-zero value,
Readline will install a signal handler for @code{SIGWINCH}.
The default value of @code{rl_catch_sigwinch} is 1.
@end deftypevar
@deftypevar int rl_change_environment
If this variable is set to a non-zero value,
and Readline is handling @code{SIGWINCH}, Readline will modify the
@var{LINES} and @var{COLUMNS} environment variables upon receipt of a
@code{SIGWINCH}
The default value of @code{rl_change_environment} is 1.
@end deftypevar
If an application does not wish to have Readline catch any signals, or
to handle signals other than those Readline catches (@code{SIGHUP},
for example),
+4
View File
@@ -617,6 +617,10 @@ extern int rl_catch_signals;
to do that. */
extern int rl_catch_sigwinch;
/* If non-zero, the readline SIGWINCH handler will modify LINES and
COLUMNS in the environment. */
extern int rl_change_environment;
/* Completion variables. */
/* Pointer to the generator function for completion_matches ().
NULL means to use rl_filename_completion_function (), the default
+9 -4
View File
@@ -81,11 +81,15 @@ static void _win_get_screensize PARAMS((int *, int *));
static void _emx_get_screensize PARAMS((int *, int *));
#endif
/* If the calling application sets this to a non-zero value, readline will
use the $LINES and $COLUMNS environment variables to set its idea of the
window size before interrogating the kernel. */
/* If the calling application sets this to a non-zero value, readline will
use the $LINES and $COLUMNS environment variables to set its idea of the
window size before interrogating the kernel. */
int rl_prefer_env_winsize = 0;
/* If this is non-zero, readline will set LINES and COLUMNS in the
environment when it handles SIGWINCH. */
int rl_change_environment = 1;
/* **************************************************************** */
/* */
/* Terminal and Termcap */
@@ -305,7 +309,8 @@ _rl_get_screen_size (tty, ignore_env)
/* If we're being compiled as part of bash, set the environment
variables $LINES and $COLUMNS to new values. Otherwise, just
do a pair of putenv () or setenv () calls. */
sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth);
if (rl_change_environment)
sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth);
if (_rl_term_autowrap == 0)
_rl_screenwidth--;