commit bash-20110819 snapshot

This commit is contained in:
Chet Ramey
2012-01-09 08:25:50 -05:00
parent f308cbc4f2
commit 1582575768
7 changed files with 87 additions and 40 deletions
+28
View File
@@ -12082,3 +12082,31 @@ builtins/return.def
let it handle proper parsing and handling of arguments. Fixes
issue most recently raised by Linda Walsh <bash@tlinx.org>.
Reverses change from 9/11/2008 (see above)
8/16
----
doc/{bash.1,bashref.texi}
- clean up `set -e' language to make it clearer that any failure of
a compound command will cause the shell to exit, not just subshells
and brace commands
8/17
----
configure.in
- make the various XXX_FOR_BUILD variables `precious' to autoconf to
avoid stale data
- change how CC_FOR_BUILD is initialized when cross-compiling and not,
but do not change behavior
- initialize CFLAGS_FOR_BUILD to -g when cross-compiling
- initialize LIBS_FOR_BUILD to $(LIBS) when not cross-compiling, empty
when cross-compiling
- create AUTO_CFLAGS variable to hold basic CFLAGS defaults; used when
CFLAGS not inherited from environment (like effect of old
auto_cflags variable)
- substitute LIBS_FOR_BUILD into output Makefiles
[changes inspired by bug report from Nathan Phillip Brink
<ohnobinki@ohnopublishing.net> -- gentoo bug 378941]
builtins/Makefile.in
- substitute LIBS_FOR_BUILD from configure, not strictly initialized
to $(LIBS)
+2 -2
View File
@@ -67,8 +67,8 @@ LIBS = @LIBS@
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
#LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
LIBS_FOR_BUILD = $(LIBS)
LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
#LIBS_FOR_BUILD = $(LIBS)
BASHINCDIR = ${topdir}/include
+4 -1
View File
@@ -23,7 +23,7 @@ $PRODUCES ulimit.c
$BUILTIN ulimit
$FUNCTION ulimit_builtin
$DEPENDS_ON !_MINIX
$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit]
$SHORT_DOC ulimit [-SHabcdefilmnpqrstuvxT] [limit]
Modify shell resource limits.
Provides control over the resources available to the shell and processes
@@ -50,6 +50,9 @@ Options:
-u the maximum number of user processes
-v the size of virtual memory
-x the maximum number of file locks
-T the maximum number of threads
Not all options are available on all platforms.
If LIMIT is given, it is the new value of the specified resource; the
special LIMIT values `soft', `hard', and `unlimited' stand for the
+28 -20
View File
@@ -21,7 +21,7 @@ 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.2, version 4.041])dnl
AC_REVISION([for Bash 4.2, version 4.042])dnl
define(bashvers, 4.2)
define(relstatus, maint)
@@ -247,6 +247,12 @@ AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble me
AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval)
AC_ARG_ENABLE(static-link, AC_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval)
dnl So-called `precious' variables
AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time])
AC_ARG_VAR([CFLAGS_FOR_BUILD], [Compliation options (CFLAGS) used when compiling binaries used only at build time])
AC_ARG_VAR([LDFLAGS_FOR_BUILD], [Linker options (LDFLAGS) used when compiling binaries used only at build time])
AC_ARG_VAR([CPPFLAGS_FOR_BUILD], [C preprocessor options (CPPFLAGS) used when compiling binaries used only at build time])
dnl opt_job_control is handled later, after BASH_JOB_CONTROL_MISSING runs
dnl opt_readline and opt_history are handled later, because AC_PROG_CC needs
@@ -432,22 +438,19 @@ fi
AC_SUBST(SIGNAMES_H)
AC_SUBST(SIGNAMES_O)
if test -z "$CC_FOR_BUILD"; then
if test "x$cross_compiling" = "xno"; then
CC_FOR_BUILD='$(CC)'
else
CC_FOR_BUILD=gcc
fi
fi
AC_SUBST(CC_FOR_BUILD)
dnl END changes for cross-building
dnl We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
if test -z "$CFLAGS"; then
AUTO_CFLAGS="-g ${GCC+-O2}"
AUTO_LDFLAGS="-g ${GCC+-O2}"
else
AUTO_CFLAGS= AUTO_LDFLAGS=
fi
dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
dnl default values
CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
dnl handle options that alter how bash is compiled and linked
dnl these must come after the test for cc/gcc
@@ -476,27 +479,33 @@ if test "$opt_static_link" = yes; then
fi
fi
# set the appropriate make variables for building the "build tools"
if test "X$cross_compiling" = "Xno"; then
CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"}
CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
if test -z "$auto_cflags"; then
CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
fi
# CFLAGS set above to default value if not passed in environment
CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
else
CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
fi
test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(STATIC_LD)
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CPPFLAGS_FOR_BUILD)
AC_SUBST(LDFLAGS_FOR_BUILD)
AC_SUBST(LIBS_FOR_BUILD)
AC_PROG_GCC_TRADITIONAL
@@ -771,7 +780,6 @@ AC_CHECK_DECLS([strtold], [
AC_DEFINE(STRTOLD_BROKEN)
fi
])
BASH_CHECK_DECL(strtoimax)
BASH_CHECK_DECL(strtol)
+14 -9
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Thu Jul 28 18:11:21 EDT 2011
.\" Last Change: Tue Aug 16 20:43:02 EDT 2011
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2011 July 28" "GNU Bash 4.2"
.TH BASH 1 "2011 August 16" "GNU Bash 4.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -689,8 +689,9 @@ Expressions are composed of the primaries described below under
.SM
.BR "CONDITIONAL EXPRESSIONS" .
Word splitting and pathname expansion are not performed on the words
between the \fB[[\fP and \fB]]\fP; tilde expansion, parameter and
variable expansion, arithmetic expansion, command substitution, process
between the \fB[[\fP and \fB]]\fP; tilde expansion,
parameter and variable expansion,
arithmetic expansion, command substitution, process
substitution, and quote removal are performed.
Conditional operators such as \fB\-f\fP must be unquoted to be recognized
as primaries.
@@ -8499,13 +8500,14 @@ immediately, rather than before the next primary prompt. This is
effective only when job control is enabled.
.TP 8
.B \-e
Exit immediately if a \fIpipeline\fP (which may consist of a single
\fIsimple command\fP), a \fIsubshell\fP command enclosed in parentheses,
or one of the commands executed as part of a command list enclosed
by braces (see
Exit immediately if a
\fIpipeline\fP (which may consist of a single \fIsimple command\fP),
a \fIlist\fP,
or a \fIcompound command\fP
(see
.SM
.B SHELL GRAMMAR
above) exits with a non-zero status.
above), exits with a non-zero status.
The shell does not exit if the
command that fails is part of the command list immediately following a
.B while
@@ -8525,6 +8527,9 @@ any command in a pipeline but the last,
or if the command's return value is
being inverted with
.BR ! .
If a compound command other than a subshell
returns a non-zero status because a command failed
while \fB\-e\fP was being ignored, the shell does not exit.
A trap on \fBERR\fP, if set, is executed before the shell exits.
This option applies to the shell environment and each subshell environment
separately (see
+8 -5
View File
@@ -4190,11 +4190,11 @@ Cause the status of terminated background jobs to be reported
immediately, rather than before printing the next primary prompt.
@item -e
Exit immediately if a pipeline (@pxref{Pipelines}), which may consist
of a single simple command (@pxref{Simple Commands}),
a subshell command enclosed in parentheses (@pxref{Command Grouping}),
or one of the commands executed as part of a command list enclosed
by braces (@pxref{Command Grouping})
Exit immediately if
a pipeline (@pxref{Pipelines}), which may consist of a single simple command
(@pxref{Simple Commands}),
a list (@pxref{Lists}),
or a compound command (@pxref{Compound Commands})
returns a non-zero status.
The shell does not exit if the command that fails is part of the
command list immediately following a @code{while} or @code{until} keyword,
@@ -4203,6 +4203,9 @@ part of any command executed in a @code{&&} or @code{||} list except
the command following the final @code{&&} or @code{||},
any command in a pipeline but the last,
or if the command's return status is being inverted with @code{!}.
If a compound command other than a subshell
returns a non-zero status because a command failed
while @option{-e} was being ignored, the shell does not exit.
A trap on @code{ERR}, if set, is executed before the shell exits.
This option applies to the shell environment and each subshell environment
+3 -3
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2011 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Thu Jul 28 18:11:38 EDT 2011
@set LASTCHANGE Tue Aug 16 19:57:55 EDT 2011
@set EDITION 4.2
@set VERSION 4.2
@set UPDATED 28 July 2011
@set UPDATED-MONTH July 2011
@set UPDATED 16 August 2011
@set UPDATED-MONTH August 2011