commit bash-20140228 snapshot

This commit is contained in:
Chet Ramey
2014-03-07 16:11:28 -05:00
parent df8375c37c
commit 15baad6212
34 changed files with 23705 additions and 3904 deletions
+26
View File
@@ -5848,3 +5848,29 @@ variables.c
simple variable assignment would set a variable in the global
context instead of a local context. Bug report from
Geir Hauge <geir.hauge@gmail.com>
2/26
----
[bash-4.3 released]
2/27
----
aclocal.m4
- broken wcwidth check: fix typo reported by David Michael
<fedora.dm0@gmail.com>
2/28
----
support/bashbug.sh
- add ${BUGADDR} to error message printed if sending mail fails
trap.c
- _run_trap_internal: don't call {save,restore}_pipeline if running
DEBUG trap; run_debug_trap calls them itself. Fixes bug reported
by Moe Tunes <moetunes42@gmail.com>
test.c
- unary_test: fix 'R' case by using find_variable_noref instead of
find_variable
- test_unop: add back missing 'R' case. Fixes bug reported by
NBaH <nbah@sfr.fr>
+5870
View File
File diff suppressed because it is too large Load Diff
+22
View File
@@ -586,6 +586,28 @@ doc/htmlpost.sh f 755
doc/infopost.sh f 755
doc/fdl.texi f
doc/fdl.txt f
#
doc/article.ps f
doc/rose94.ps f
doc/bash.ps f
doc/bashbug.ps f
doc/builtins.ps f
doc/rbash.ps f
doc/bashref.ps f
doc/bashref.dvi f
doc/bash.0 f
doc/bashbug.0 f
doc/builtins.0 f
doc/rbash.0 f
doc/article.txt f
doc/bash.html f
doc/bashref.html f
doc/article.pdf f
doc/bash.pdf f
doc/bashref.pdf f
doc/rose94.pdf f
doc/aosa-bash.pdf f
#
support/Makefile.in f
support/bashversion.c f
support/checkbashisms f 755
+1 -1
View File
@@ -107,7 +107,7 @@ The following list is what's changed when `POSIX mode' is in effect:
statements. A variable assignment error occurs, for example, when
trying to assign a value to a readonly variable.
26. A non-interactive shell exists with an error status if a variable
26. A non-interactive shell exits with an error status if a variable
assignment error occurs in an assignment statement preceding a
special builtin, but not with any other simple command.
Vendored
+1 -1
View File
@@ -1784,7 +1784,7 @@ char **v;
exit (w == 0); /* exit 0 if wcwidth broken */
}
],
bash_cv_wcwidth_broken=yes, bash_cv_wcwdith_broken=no, bash_cv_wcwidth_broken=no)])
bash_cv_wcwidth_broken=yes, bash_cv_wcwidth_broken=no, bash_cv_wcwidth_broken=no)])
if test "$bash_cv_wcwidth_broken" = yes; then
AC_DEFINE(WCWIDTH_BROKEN, 1, [wcwidth is usually not broken])
fi
+1 -1
View File
@@ -11279,7 +11279,7 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"; then :
bash_cv_wcwidth_broken=yes
else
bash_cv_wcwdith_broken=no
bash_cv_wcwidth_broken=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
+320 -162
View File
@@ -1,14 +1,12 @@
@%:@! /bin/sh
@%:@ From configure.in for Bash 4.2, version 4.049.
@%:@ From configure.ac for Bash 4.3, version 4.063.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.68 for bash 4.2-maint.
@%:@ Generated by GNU Autoconf 2.69 for bash 4.3-maint.
@%:@
@%:@ Report bugs to <bug-bash@gnu.org>.
@%:@
@%:@
@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
@%:@ Foundation, Inc.
@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@%:@
@%:@
@%:@ This configure script is free software; the Free Software Foundation
@@ -137,6 +135,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,21 +239,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
if test x$as_have_required = xno; then :
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" |
} @%:@ as_fn_mkdir_p
@%:@ as_fn_executable_p FILE
@%:@ -----------------------
@%:@ Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} @%:@ as_fn_executable_p
@%:@ as_fn_append VAR VALUE
@%:@ ----------------------
@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -508,28 +548,8 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in @%:@(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -561,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
PACKAGE_VERSION='4.2-maint'
PACKAGE_STRING='bash 4.2-maint'
PACKAGE_VERSION='4.3-maint'
PACKAGE_STRING='bash 4.3-maint'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
@@ -783,11 +803,13 @@ enable_cond_command
enable_cond_regexp
enable_coprocesses
enable_debugger
enable_direxpand_default
enable_directory_stack
enable_disabled_builtins
enable_dparen_arithmetic
enable_extended_glob
enable_extended_glob_default
enable_glob_asciiranges_default
enable_help_builtin
enable_history
enable_job_control
@@ -1286,8 +1308,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1373,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.2-maint to adapt to many kinds of systems.
\`configure' configures bash 4.3-maint to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1438,7 +1458,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bash 4.2-maint:";;
short | recursive ) echo "Configuration of bash 4.3-maint:";;
esac
cat <<\_ACEOF
@@ -1466,6 +1486,8 @@ Optional Features:
--enable-coprocesses enable coprocess support and the coproc reserved
word
--enable-debugger enable support for bash debugger
--enable-direxpand-default
enable the direxpand shell option by default
--enable-directory-stack
enable builtins pushd/popd/dirs
--enable-disabled-builtins
@@ -1476,6 +1498,9 @@ Optional Features:
--enable-extended-glob-default
force extended pattern matching to be enabled by
default
--enable-glob-asciiranges-default
force bracket range expressions in pattern matching
to use the C locale by default
--enable-help-builtin include the help builtin
--enable-history turn on command history
--enable-job-control enable job control features
@@ -1625,10 +1650,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bash configure 4.2-maint
generated by GNU Autoconf 2.68
bash configure 4.3-maint
generated by GNU Autoconf 2.69
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1704,7 +1729,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2108,7 +2133,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -2124,7 +2150,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -2150,7 +2177,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(($2) < 0)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -2166,7 +2194,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -2200,7 +2229,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -2329,8 +2359,8 @@ 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.2-maint, which was
generated by GNU Autoconf 2.68. Invocation command line was
It was created by bash $as_me 4.3-maint, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2722,7 +2752,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
ac_config_headers="$ac_config_headers config.h"
BASHVERS=4.2
BASHVERS=4.3
RELSTATUS=maint
case "$RELSTATUS" in
@@ -2827,6 +2857,7 @@ sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
*-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
*-aix*) opt_bash_malloc=no ;; # AIX machines
*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
@@ -2837,6 +2868,8 @@ sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
*-beos*) opt_bash_malloc=no ;; # they say it's suitable
*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
*-nsk*) opt_bash_malloc=no ;; # HP NonStop
*-haiku*) opt_bash_malloc=no ;; # Haiku OS
esac
# memory scrambling on free()
@@ -2967,6 +3000,8 @@ opt_single_longdoc_strings=yes
opt_casemod_attrs=yes
opt_casemod_expansions=yes
opt_extglob_default=no
opt_dircomplete_expand_default=no
opt_globascii_default=no
opt_static_link=no
opt_profiling=no
@@ -2987,6 +3022,7 @@ if test $opt_minimal_config = yes; then
opt_net_redirs=no opt_progcomp=no opt_separate_help=no
opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
opt_globascii_default=no
fi
@%:@ Check whether --enable-alias was given.
@@ -3049,6 +3085,11 @@ if test "${enable_debugger+set}" = set; then :
enableval=$enable_debugger; opt_debugger=$enableval
fi
@%:@ Check whether --enable-direxpand-default was given.
if test "${enable_direxpand_default+set}" = set; then :
enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
fi
@%:@ Check whether --enable-directory-stack was given.
if test "${enable_directory_stack+set}" = set; then :
enableval=$enable_directory_stack; opt_dirstack=$enableval
@@ -3074,6 +3115,11 @@ if test "${enable_extended_glob_default+set}" = set; then :
enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
fi
@%:@ Check whether --enable-glob-asciiranges-default was given.
if test "${enable_glob_asciiranges_default+set}" = set; then :
enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
fi
@%:@ Check whether --enable-help-builtin was given.
if test "${enable_help_builtin+set}" = set; then :
enableval=$enable_help_builtin; opt_help=$enableval
@@ -3284,6 +3330,17 @@ fi
if test $opt_casemod_expansions = yes; then
$as_echo "@%:@define CASEMOD_EXPANSIONS 1" >>confdefs.h
fi
if test $opt_dircomplete_expand_default = yes; then
$as_echo "@%:@define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
fi
if test $opt_globascii_default = yes; then
$as_echo "@%:@define GLOBASCII_DEFAULT 1" >>confdefs.h
else
$as_echo "@%:@define GLOBASCII_DEFAULT 0" >>confdefs.h
fi
if test $opt_memscramble = yes; then
@@ -3357,7 +3414,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3397,7 +3454,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3450,7 +3507,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3491,7 +3548,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3549,7 +3606,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3593,7 +3650,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4039,8 +4096,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4324,7 +4380,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4390,7 +4446,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4597,8 +4653,8 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# define __EXTENSIONS__ 1
$ac_includes_default
# define __EXTENSIONS__ 1
$ac_includes_default
int
main ()
{
@@ -4826,6 +4882,8 @@ _ACEOF
esac
rm -rf conftest*
fi
fi
@@ -5465,7 +5523,7 @@ case $as_dir/ in @%:@((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -5521,8 +5579,9 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_AR+:} false; then :
@@ -5537,8 +5596,8 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AR=""
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -5546,7 +5605,6 @@ done
done
IFS=$as_save_IFS
test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
fi
fi
AR=$ac_cv_prog_AR
@@ -5559,6 +5617,60 @@ $as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
$as_echo "$ac_ct_AR" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_AR" = x; then
AR=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
else
AR="$ac_cv_prog_AR"
fi
test -n "$ARFLAGS" || ARFLAGS="cr"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
@@ -5577,7 +5689,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5617,7 +5729,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5670,7 +5782,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5727,6 +5839,12 @@ $as_echo "no" >&6; }
fi
case "$ac_cv_prog_YACC" in
*bison*) ;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
esac
case "$host_os" in
opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
*) MAKE_SHELL=/bin/sh ;;
@@ -5803,11 +5921,11 @@ else
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
/* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
const charset cs;
const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -5824,8 +5942,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
{ /* SCO 3.2v4 cc rejects this sort of thing. */
char tx;
char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -5841,10 +5960,10 @@ main ()
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
{ /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -6197,7 +6316,8 @@ static int test_array @<:@1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
- (LDBL_MANT_DIG < DBL_MANT_DIG)))
&& (int) LDBL_EPSILON == 0
)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -6253,7 +6373,8 @@ int
main ()
{
static int test_array @<:@1 - 2 * !(((char) -1) < 0)@:>@;
test_array @<:@0@:>@ = 0
test_array @<:@0@:>@ = 0;
return test_array @<:@0@:>@;
;
return 0;
@@ -6471,7 +6592,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6835,23 +6956,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
find_stack_direction ()
find_stack_direction (int *addr, int depth)
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
int dir, dummy = 0;
if (! addr)
addr = &dummy;
*addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
dir = depth ? find_stack_direction (addr, depth - 1) : 0;
return dir + dummy;
}
int
main ()
main (int argc, char **argv)
{
return find_stack_direction () < 0;
return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -8209,7 +8327,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_INTLBISON="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -9353,23 +9471,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
find_stack_direction ()
find_stack_direction (int *addr, int depth)
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
int dir, dummy = 0;
if (! addr)
addr = &dummy;
*addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
dir = depth ? find_stack_direction (addr, depth - 1) : 0;
return dir + dummy;
}
int
main ()
main (int argc, char **argv)
{
return find_stack_direction () < 0;
return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -9911,6 +10026,20 @@ esac
fi
ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
if test "x$ac_cv_func_strdup" = xyes; then :
$as_echo "@%:@define HAVE_STRDUP 1" >>confdefs.h
else
case " $LIB@&t@OBJS " in
*" strdup.$ac_objext "* ) ;;
*) LIB@&t@OBJS="$LIB@&t@OBJS strdup.$ac_objext"
;;
esac
fi
ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
"
@@ -10774,7 +10903,7 @@ fi
rm -f conftest.mmap conftest.txt
for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
munmap stpcpy strcspn strdup
munmap stpcpy strcspn
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -11123,10 +11252,7 @@ if ${bash_cv_wcwidth_broken+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
bash_cv_wcwidth_broken=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11153,7 +11279,7 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"; then :
bash_cv_wcwidth_broken=yes
else
bash_cv_wcwdith_broken=no
bash_cv_wcwidth_broken=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -11162,7 +11288,7 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
$as_echo "$bash_cv_wcwidth_broken" >&6; }
if test $bash_cv_wcwidth_broken = yes; then
if test "$bash_cv_wcwidth_broken" = yes; then
$as_echo "@%:@define WCWIDTH_BROKEN 1" >>confdefs.h
@@ -13096,6 +13222,49 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
$as_echo_n "checking for sig_atomic_t... " >&6; }
if ${bash_cv_type_sig_atomic_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#include <signal.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "sig_atomic_t" >/dev/null 2>&1; then :
bash_cv_type_sig_atomic_t=yes
else
bash_cv_type_sig_atomic_t=no
fi
rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
$as_echo "$bash_cv_type_sig_atomic_t" >&6; }
if test $bash_cv_type_sig_atomic_t = no; then
cat >>confdefs.h <<_ACEOF
@%:@define sig_atomic_t int
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5
$as_echo_n "checking for quad_t... " >&6; }
if ${bash_cv_type_quad_t+:} false; then :
@@ -13268,7 +13437,7 @@ if test $bash_cv_type_socklen_t = yes; then
fi
if test $bash_cv_type_socklen_t = no; then
cat >>confdefs.h <<_ACEOF
@%:@define socklen_t int
@%:@define socklen_t unsigned int
_ACEOF
fi
@@ -15762,6 +15931,7 @@ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
powerux*) LOCAL_LIBS="-lgen" ;;
cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
esac
case "${host_os}-${CC}" in
@@ -16282,16 +16452,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -16351,28 +16521,16 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in @%:@(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
@%:@ as_fn_executable_p FILE
@%:@ -----------------------
@%:@ Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} @%:@ as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -16393,8 +16551,8 @@ 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.2-maint, which was
generated by GNU Autoconf 2.68. Invocation command line was
This file was extended by bash $as_me 4.3-maint, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16459,11 +16617,11 @@ _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.2-maint
configured by $0, generated by GNU Autoconf 2.68,
bash config.status 4.3-maint
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -16552,7 +16710,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
+71
View File
@@ -73,6 +73,77 @@
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/opt/local/share/autoconf'
],
[
'/opt/local/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.ac'
],
{
'_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AM_PATH_GUILE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_REQUIRE_AUX_FILE' => 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,
'AM_MAKEFILE_INCLUDE' => 1,
'_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 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,
'include' => 1,
'LT_INIT' => 1,
'AM_PROG_AR' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
'AC_FC_PP_SRCEXT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 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,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' )
);
+2240 -2223
View File
File diff suppressed because it is too large Load Diff
Vendored
+11 -11
View File
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac for Bash 4.3, version 4.063.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bash 4.3-release.
# Generated by GNU Autoconf 2.69 for bash 4.3-maint.
#
# 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-release'
PACKAGE_STRING='bash 4.3-release'
PACKAGE_VERSION='4.3-maint'
PACKAGE_STRING='bash 4.3-maint'
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-release to adapt to many kinds of systems.
\`configure' configures bash 4.3-maint 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-release:";;
short | recursive ) echo "Configuration of bash 4.3-maint:";;
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-release
bash configure 4.3-maint
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-release, which was
It was created by bash $as_me 4.3-maint, 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=release
RELSTATUS=maint
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -11279,7 +11279,7 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"; then :
bash_cv_wcwidth_broken=yes
else
bash_cv_wcwdith_broken=no
bash_cv_wcwidth_broken=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -16551,7 +16551,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-release, which was
This file was extended by bash $as_me 4.3-maint, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16617,7 +16617,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-release
bash config.status 4.3-maint
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.063])dnl
define(bashvers, 4.3)
define(relstatus, release)
define(relstatus, maint)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
+1212
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -144,7 +144,7 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 4.3, first made available on xx December, 2013.
The latest version is 4.3, first made available on 26 February, 2014.
A3) Where can I get it?
+12 -10
View File
@@ -4294,16 +4294,18 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as with
the llooccaall command, unless the --gg option is supplied. If a vari-
able name is followed by =_v_a_l_u_e, the value of the variable is
set to _v_a_l_u_e. The return value is 0 unless an invalid option is
encountered, an attempt is made to define a function using ``-f
foo=bar'', an attempt is made to assign a value to a readonly
variable, an attempt is made to assign a value to an array vari-
able without using the compound assignment syntax (see AArrrraayyss
above), one of the _n_a_m_e_s is not a valid shell variable name, an
attempt is made to turn off readonly status for a readonly vari-
able, an attempt is made to turn off array status for an array
variable, or an attempt is made to display a non-existent func-
tion with --ff.
set to _v_a_l_u_e. When using --aa or --AA and the compound assignment
syntax to create array variables, additional attributes do not
take effect until subsequent assignments. The return value is 0
unless an invalid option is encountered, an attempt is made to
define a function using ``-f foo=bar'', an attempt is made to
assign a value to a readonly variable, an attempt is made to
assign a value to an array variable without using the compound
assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
valid shell variable name, an attempt is made to turn off read-
only status for a readonly variable, an attempt is made to turn
off array status for an array variable, or an attempt is made to
display a non-existent function with --ff.
ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]]
Without options, displays the list of currently remembered
+4 -1
View File
@@ -9612,6 +9612,9 @@ command,
unless the <B>-g</B> option is supplied.
If a variable name is followed by =<I>value</I>, the value of
the variable is set to <I>value</I>.
When using <B>-a</B> or <B>-A</B> and the compound assignment syntax to
create array variables, additional attributes do not take effect until
subsequent assignments.
The return value is 0 unless an invalid option is encountered,
an attempt is made to define a function using
@@ -13267,6 +13270,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 04 February 2014 09:39:07 EST
Time: 24 February 2014 08:28:34 EST
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+11 -4
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on February, 4 2014 by texi2html 1.64 -->
<!-- Created on February, 24 2014 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
@@ -5158,6 +5158,11 @@ If a variable name is followed by =<VAR>value</VAR>, the value of the variable
is set to <VAR>value</VAR>.
</P><P>
When using <SAMP>`-a'</SAMP> or <SAMP>`-A'</SAMP> and the compound assignment syntax to
create array variables, additional attributes do not take effect until
subsequent assignments.
</P><P>
The return status is zero unless an invalid option is encountered,
an attempt is made to define a function using <SAMP>`-f foo=bar'</SAMP>,
an attempt is made to assign a value to a readonly variable,
@@ -9415,7 +9420,7 @@ a value to a readonly variable.
<P>
<LI>
A non-interactive shell exists with an error status if a variable
A non-interactive shell exits with an error status if a variable
assignment error occurs in an assignment statement preceding a special
builtin, but not with any other simple command.
<P>
@@ -10701,6 +10706,8 @@ the input read so far, or can take additional input to complete a longer
key sequence).
If no input is received within the timeout, Readline will use the shorter
but complete key sequence.
Readline uses this value to determine whether or not input is
available on the current input source (<CODE>rl_instream</CODE> by default).
The value is specified in milliseconds, so a value of 1000 means that
Readline will wait one second for additional input.
If this variable is set to a value less than or equal to zero, or to a
@@ -17304,7 +17311,7 @@ to permit their use in free software.
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated by <I>Chet Ramey</I> on <I>February, 4 2014</I>
This document was generated by <I>Chet Ramey</I> on <I>February, 24 2014</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -17466,7 +17473,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>February, 4 2014</I>
by <I>Chet Ramey</I> on <I>February, 24 2014</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+113 -107
View File
@@ -3414,6 +3414,10 @@ POSIX standard.
command, unless the `-g' option is used. If a variable name is
followed by =VALUE, the value of the variable is set to VALUE.
When using `-a' or `-A' and the compound assignment syntax to
create array variables, additional attributes do not take effect
until subsequent assignments.
The return status is zero unless an invalid option is encountered,
an attempt is made to define a function using `-f foo=bar', an
attempt is made to assign a value to a readonly variable, an
@@ -6424,7 +6428,7 @@ startup files.
statements. A variable assignment error occurs, for example, when
trying to assign a value to a readonly variable.
26. A non-interactive shell exists with an error status if a variable
26. A non-interactive shell exits with an error status if a variable
assignment error occurs in an assignment statement preceding a
special builtin, but not with any other simple command.
@@ -7272,8 +7276,10 @@ Variable Settings
complete key sequence using the input read so far, or can
take additional input to complete a longer key sequence). If
no input is received within the timeout, Readline will use
the shorter but complete key sequence. The value is
specified in milliseconds, so a value of 1000 means that
the shorter but complete key sequence. Readline uses this
value to determine whether or not input is available on the
current input source (`rl_instream' by default). The value
is specified in milliseconds, so a value of 1000 means that
Readline will wait one second for additional input. If this
variable is set to a value less than or equal to zero, or to a
non-numeric value, Readline will wait until another key is
@@ -10574,8 +10580,8 @@ D.1 Index of Shell Builtin Commands
(line 7)
* disown: Job Control Builtins.
(line 89)
* echo: Bash Builtins. (line 241)
* enable: Bash Builtins. (line 303)
* echo: Bash Builtins. (line 245)
* enable: Bash Builtins. (line 307)
* eval: Bourne Shell Builtins.
(line 89)
* exec: Bourne Shell Builtins.
@@ -10592,26 +10598,26 @@ D.1 Index of Shell Builtin Commands
(line 137)
* hash: Bourne Shell Builtins.
(line 180)
* help: Bash Builtins. (line 332)
* help: Bash Builtins. (line 336)
* history: Bash History Builtins.
(line 40)
* jobs: Job Control Builtins.
(line 27)
* kill: Job Control Builtins.
(line 59)
* let: Bash Builtins. (line 353)
* local: Bash Builtins. (line 361)
* logout: Bash Builtins. (line 372)
* mapfile: Bash Builtins. (line 377)
* let: Bash Builtins. (line 357)
* local: Bash Builtins. (line 365)
* logout: Bash Builtins. (line 376)
* mapfile: Bash Builtins. (line 381)
* popd: Directory Stack Builtins.
(line 39)
* printf: Bash Builtins. (line 425)
* printf: Bash Builtins. (line 429)
* pushd: Directory Stack Builtins.
(line 61)
* pwd: Bourne Shell Builtins.
(line 200)
* read: Bash Builtins. (line 473)
* readarray: Bash Builtins. (line 560)
* read: Bash Builtins. (line 477)
* readarray: Bash Builtins. (line 564)
* readonly: Bourne Shell Builtins.
(line 210)
* return: Bourne Shell Builtins.
@@ -10620,7 +10626,7 @@ D.1 Index of Shell Builtin Commands
* shift: Bourne Shell Builtins.
(line 245)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 569)
* source: Bash Builtins. (line 573)
* suspend: Job Control Builtins.
(line 101)
* test: Bourne Shell Builtins.
@@ -10629,12 +10635,12 @@ D.1 Index of Shell Builtin Commands
(line 334)
* trap: Bourne Shell Builtins.
(line 340)
* type: Bash Builtins. (line 574)
* typeset: Bash Builtins. (line 606)
* ulimit: Bash Builtins. (line 612)
* type: Bash Builtins. (line 578)
* typeset: Bash Builtins. (line 610)
* ulimit: Bash Builtins. (line 616)
* umask: Bourne Shell Builtins.
(line 389)
* unalias: Bash Builtins. (line 703)
* unalias: Bash Builtins. (line 707)
* unset: Bourne Shell Builtins.
(line 407)
* wait: Job Control Builtins.
@@ -10826,13 +10832,13 @@ D.3 Parameter and Variable Index
(line 27)
* MAPFILE: Bash Variables. (line 463)
* mark-modified-lines: Readline Init File Syntax.
(line 194)
(line 196)
* mark-symlinked-directories: Readline Init File Syntax.
(line 199)
(line 201)
* match-hidden-files: Readline Init File Syntax.
(line 204)
(line 206)
* menu-complete-display-prefix: Readline Init File Syntax.
(line 211)
(line 213)
* meta-flag: Readline Init File Syntax.
(line 153)
* OLDPWD: Bash Variables. (line 467)
@@ -10843,9 +10849,9 @@ D.3 Parameter and Variable Index
(line 38)
* OSTYPE: Bash Variables. (line 474)
* output-meta: Readline Init File Syntax.
(line 216)
(line 218)
* page-completions: Readline Init File Syntax.
(line 221)
(line 223)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 477)
@@ -10865,19 +10871,19 @@ D.3 Parameter and Variable Index
* READLINE_POINT: Bash Variables. (line 528)
* REPLY: Bash Variables. (line 532)
* revert-all-at-newline: Readline Init File Syntax.
(line 231)
(line 233)
* SECONDS: Bash Variables. (line 535)
* SHELL: Bash Variables. (line 541)
* SHELLOPTS: Bash Variables. (line 546)
* SHLVL: Bash Variables. (line 555)
* show-all-if-ambiguous: Readline Init File Syntax.
(line 237)
(line 239)
* show-all-if-unmodified: Readline Init File Syntax.
(line 243)
(line 245)
* show-mode-in-prompt: Readline Init File Syntax.
(line 252)
(line 254)
* skip-completed-text: Readline Init File Syntax.
(line 257)
(line 259)
* TEXTDOMAIN: Locale Translation. (line 11)
* TEXTDOMAINDIR: Locale Translation. (line 11)
* TIMEFORMAT: Bash Variables. (line 560)
@@ -10885,7 +10891,7 @@ D.3 Parameter and Variable Index
* TMPDIR: Bash Variables. (line 610)
* UID: Bash Variables. (line 614)
* visible-stats: Readline Init File Syntax.
(line 270)
(line 272)

File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes
@@ -11211,82 +11217,82 @@ Node: Shell Scripts113153
Node: Shell Builtin Commands115671
Node: Bourne Shell Builtins117699
Node: Bash Builtins137606
Node: Modifying Shell Behavior165059
Node: The Set Builtin165404
Node: The Shopt Builtin175730
Node: Special Builtins190151
Node: Shell Variables191130
Node: Bourne Shell Variables191570
Node: Bash Variables193601
Node: Bash Features220476
Node: Invoking Bash221375
Node: Bash Startup Files227153
Node: Interactive Shells232182
Node: What is an Interactive Shell?232592
Node: Is this Shell Interactive?233241
Node: Interactive Shell Behavior234056
Node: Bash Conditional Expressions237344
Node: Shell Arithmetic241346
Node: Aliases244122
Node: Arrays246678
Node: The Directory Stack251659
Node: Directory Stack Builtins252378
Node: Controlling the Prompt255334
Node: The Restricted Shell258106
Node: Bash POSIX Mode259943
Node: Job Control269330
Node: Job Control Basics269790
Node: Job Control Builtins274509
Node: Job Control Variables278980
Node: Command Line Editing280138
Node: Introduction and Notation281810
Node: Readline Interaction283432
Node: Readline Bare Essentials284623
Node: Readline Movement Commands286412
Node: Readline Killing Commands287377
Node: Readline Arguments289297
Node: Searching290341
Node: Readline Init File292527
Node: Readline Init File Syntax293674
Node: Conditional Init Constructs310511
Node: Sample Init File313044
Node: Bindable Readline Commands316162
Node: Commands For Moving317369
Node: Commands For History318513
Node: Commands For Text322698
Node: Commands For Killing325627
Node: Numeric Arguments328084
Node: Commands For Completion329223
Node: Keyboard Macros333415
Node: Miscellaneous Commands334103
Node: Readline vi Mode339909
Node: Programmable Completion340816
Node: Programmable Completion Builtins348092
Node: A Programmable Completion Example357838
Node: Using History Interactively363088
Node: Bash History Facilities363772
Node: Bash History Builtins366771
Node: History Interaction370699
Node: Event Designators373404
Node: Word Designators374626
Node: Modifiers376265
Node: Installing Bash377669
Node: Basic Installation378806
Node: Compilers and Options381498
Node: Compiling For Multiple Architectures382239
Node: Installation Names383903
Node: Specifying the System Type384721
Node: Sharing Defaults385437
Node: Operation Controls386110
Node: Optional Features387068
Node: Reporting Bugs397132
Node: Major Differences From The Bourne Shell398330
Node: GNU Free Documentation License415189
Node: Indexes440385
Node: Builtin Index440839
Node: Reserved Word Index447666
Node: Variable Index450114
Node: Function Index464294
Node: Concept Index471595
Node: Modifying Shell Behavior165232
Node: The Set Builtin165577
Node: The Shopt Builtin175903
Node: Special Builtins190324
Node: Shell Variables191303
Node: Bourne Shell Variables191743
Node: Bash Variables193774
Node: Bash Features220649
Node: Invoking Bash221548
Node: Bash Startup Files227326
Node: Interactive Shells232355
Node: What is an Interactive Shell?232765
Node: Is this Shell Interactive?233414
Node: Interactive Shell Behavior234229
Node: Bash Conditional Expressions237517
Node: Shell Arithmetic241519
Node: Aliases244295
Node: Arrays246851
Node: The Directory Stack251832
Node: Directory Stack Builtins252551
Node: Controlling the Prompt255507
Node: The Restricted Shell258279
Node: Bash POSIX Mode260116
Node: Job Control269502
Node: Job Control Basics269962
Node: Job Control Builtins274681
Node: Job Control Variables279152
Node: Command Line Editing280310
Node: Introduction and Notation281982
Node: Readline Interaction283604
Node: Readline Bare Essentials284795
Node: Readline Movement Commands286584
Node: Readline Killing Commands287549
Node: Readline Arguments289469
Node: Searching290513
Node: Readline Init File292699
Node: Readline Init File Syntax293846
Node: Conditional Init Constructs310832
Node: Sample Init File313365
Node: Bindable Readline Commands316483
Node: Commands For Moving317690
Node: Commands For History318834
Node: Commands For Text323019
Node: Commands For Killing325948
Node: Numeric Arguments328405
Node: Commands For Completion329544
Node: Keyboard Macros333736
Node: Miscellaneous Commands334424
Node: Readline vi Mode340230
Node: Programmable Completion341137
Node: Programmable Completion Builtins348413
Node: A Programmable Completion Example358159
Node: Using History Interactively363409
Node: Bash History Facilities364093
Node: Bash History Builtins367092
Node: History Interaction371020
Node: Event Designators373725
Node: Word Designators374947
Node: Modifiers376586
Node: Installing Bash377990
Node: Basic Installation379127
Node: Compilers and Options381819
Node: Compiling For Multiple Architectures382560
Node: Installation Names384224
Node: Specifying the System Type385042
Node: Sharing Defaults385758
Node: Operation Controls386431
Node: Optional Features387389
Node: Reporting Bugs397453
Node: Major Differences From The Bourne Shell398651
Node: GNU Free Documentation License415510
Node: Indexes440706
Node: Builtin Index441160
Node: Reserved Word Index447987
Node: Variable Index450435
Node: Function Index464615
Node: Concept Index471916

End Tag Table
+1 -1
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 11 FEB 2014 10:59
This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 24 FEB 2014 08:28
**/usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2013-09-11.11]:
BIN
View File
Binary file not shown.
+717 -716
View File
File diff suppressed because it is too large Load Diff
+12 -10
View File
@@ -424,16 +424,18 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e local, as with
the llooccaall command, unless the --gg option is supplied. If a vari-
able name is followed by =_v_a_l_u_e, the value of the variable is
set to _v_a_l_u_e. The return value is 0 unless an invalid option is
encountered, an attempt is made to define a function using ``-f
foo=bar'', an attempt is made to assign a value to a readonly
variable, an attempt is made to assign a value to an array vari-
able without using the compound assignment syntax (see AArrrraayyss
above), one of the _n_a_m_e_s is not a valid shell variable name, an
attempt is made to turn off readonly status for a readonly vari-
able, an attempt is made to turn off array status for an array
variable, or an attempt is made to display a non-existent func-
tion with --ff.
set to _v_a_l_u_e. When using --aa or --AA and the compound assignment
syntax to create array variables, additional attributes do not
take effect until subsequent assignments. The return value is 0
unless an invalid option is encountered, an attempt is made to
define a function using ``-f foo=bar'', an attempt is made to
assign a value to a readonly variable, an attempt is made to
assign a value to an array variable without using the compound
assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
valid shell variable name, an attempt is made to turn off read-
only status for a readonly variable, an attempt is made to turn
off array status for an array variable, or an attempt is made to
display a non-existent function with --ff.
ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]]
Without options, displays the list of currently remembered
+39 -34
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Tue Feb 4 09:39:00 2014
%%CreationDate: Mon Feb 24 08:28:31 2014
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -894,56 +894,61 @@ Q F0 .91(When the v)24.74 F .909(ariable is assigned a v)-.25 F .909
(declar)2.835 E(e)-.18 E F0(and)2.835 E F1(typeset)2.835 E F0(mak)2.835
E 2.835(ee)-.1 G(ach)-2.835 E F2(name)2.835 E F0 .335
(local, as with the)2.835 F F1(local)2.835 E F0 .335
(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E .134
(is supplied.)144 424.8 R .134(If a v)5.134 F .134
(ariable name is follo)-.25 F .134(wed by =)-.25 F F2(value)A F0 2.634
(,t)C .134(he v)-2.634 F .134(alue of the v)-.25 F .133
(ariable is set to)-.25 F F2(value)2.633 E F0 5.133(.T)C(he)-5.133 E .8
(return v)144 436.8 R .8(alue is 0 unless an in)-.25 F -.25(va)-.4 G
.801
(lid option is encountered, an attempt is made to de\214ne a function)
.25 F(using)144 448.8 Q/F4 10/Courier@0 SF 1.039(\255f foo=bar)3.539 F
F0 3.539(,a)C 3.539(na)-3.539 G 1.038(ttempt is made to assign a v)
-3.539 F 1.038(alue to a readonly v)-.25 F 1.038(ariable, an attempt is)
-.25 F .974(made to assign a v)144 460.8 R .974(alue to an array v)-.25
F .974(ariable without using the compound assignment syntax \(see)-.25 F
F1(Arrays)144 472.8 Q F0(abo)2.86 E -.15(ve)-.15 G .36(\), one of the)
.15 F F2(names)2.86 E F0 .36(is not a v)2.86 F .36(alid shell v)-.25 F
.36(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .056
(readonly status for a readonly v)144 484.8 R .057
(ariable, an attempt is made to turn of)-.25 F 2.557(fa)-.25 G .057
(rray status for an array v)-2.557 F(ari-)-.25 E
(able, or an attempt is made to display a non-e)144 496.8 Q
(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E 1.283
(is supplied.)144 424.8 R 1.283(If a v)6.283 F 1.283
(ariable name is follo)-.25 F 1.283(wed by =)-.25 F F2(value)A F0 3.783
(,t)C 1.283(he v)-3.783 F 1.283(alue of the v)-.25 F 1.282
(ariable is set to)-.25 F F2(value)3.782 E F0(.)A .926(When using)144
436.8 R F1<ad61>3.426 E F0(or)3.426 E F1<ad41>3.426 E F0 .927
(and the compound assignment syntax to create array v)3.426 F .927
(ariables, additional)-.25 F(attrib)144 448.8 Q .592(utes do not tak)-.2
F 3.092(ee)-.1 G -.25(ff)-3.092 G .592
(ect until subsequent assignments.).25 F .592(The return v)5.592 F .592
(alue is 0 unless an in)-.25 F -.25(va)-.4 G(lid).25 E .429
(option is encountered, an attempt is made to de\214ne a function using)
144 460.8 R/F4 10/Courier@0 SF .429(\255f foo=bar)2.929 F F0 2.929(,a)C
2.929(na)-2.929 G .429(ttempt is)-2.929 F .063(made to assign a v)144
472.8 R .063(alue to a readonly v)-.25 F .062
(ariable, an attempt is made to assign a v)-.25 F .062
(alue to an array v)-.25 F(ari-)-.25 E .102
(able without using the compound assignment syntax \(see)144 484.8 R F1
(Arrays)2.602 E F0(abo)2.602 E -.15(ve)-.15 G .102(\), one of the).15 F
F2(names)2.602 E F0 .102(is not a)2.602 F -.25(va)144 496.8 S .172
(lid shell v).25 F .171(ariable name, an attempt is made to turn of)-.25
F 2.671(fr)-.25 G .171(eadonly status for a readonly v)-2.671 F .171
(ariable, an)-.25 F .96(attempt is made to turn of)144 508.8 R 3.46(fa)
-.25 G .96(rray status for an array v)-3.46 F .96
(ariable, or an attempt is made to display a)-.25 F(non-e)144 520.8 Q
(xistent function with)-.15 E F1<ad66>2.5 E F0(.)A F1
(dirs [\255clpv] [+)108 513.6 Q F2(n)A F1 2.5(][)C<ad>-2.5 E F2(n)A F1
(])A F0 -.4(Wi)144 525.6 S .329
(dirs [\255clpv] [+)108 537.6 Q F2(n)A F1 2.5(][)C<ad>-2.5 E F2(n)A F1
(])A F0 -.4(Wi)144 549.6 S .329
(thout options, displays the list of currently remembered directories.)
.4 F .328(The def)5.328 F .328(ault display is on a)-.1 F 1.238
(single line with directory names separated by spaces.)144 537.6 R 1.238
(Directories are added to the list with the)6.238 F F1(pushd)144 549.6 Q
(single line with directory names separated by spaces.)144 561.6 R 1.238
(Directories are added to the list with the)6.238 F F1(pushd)144 573.6 Q
F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G
2.5(se).15 G(ntries from the list.)-2.5 E F1<ad63>144 561.6 Q F0
2.5(se).15 G(ntries from the list.)-2.5 E F1<ad63>144 585.6 Q F0
(Clears the directory stack by deleting all of the entries.)25.86 E F1
<ad6c>144 573.6 Q F0 .882
<ad6c>144 597.6 Q F0 .882
(Produces a listing using full pathnames; the def)27.52 F .881
(ault listing format uses a tilde to denote)-.1 F(the home directory)180
585.6 Q(.)-.65 E F1<ad70>144 597.6 Q F0
609.6 Q(.)-.65 E F1<ad70>144 621.6 Q F0
(Print the directory stack with one entry per line.)24.74 E F1<ad76>144
609.6 Q F0 .272(Print the directory stack with one entry per line, pre\
633.6 Q F0 .272(Print the directory stack with one entry per line, pre\
\214xing each entry with its inde)25.3 F 2.773(xi)-.15 G 2.773(nt)-2.773
G(he)-2.773 E(stack.)180 621.6 Q F1(+)144 633.6 Q F2(n)A F0 1.565
G(he)-2.773 E(stack.)180 645.6 Q F1(+)144 657.6 Q F2(n)A F0 1.565
(Displays the)25.3 F F2(n)4.065 E F0 1.565
(th entry counting from the left of the list sho)B 1.564(wn by)-.25 F F1
(dirs)4.064 E F0 1.564(when in)4.064 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
(without options, starting with zero.)180 645.6 Q F1<ad>144 657.6 Q F2
(without options, starting with zero.)180 669.6 Q F1<ad>144 681.6 Q F2
(n)A F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194
(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F
F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
(without options, starting with zero.)180 669.6 Q .258(The return v)144
686.4 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
(without options, starting with zero.)180 693.6 Q .258(The return v)144
710.4 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
(lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe)
-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-)
.15 F(tory stack.)144 698.4 Q(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735
.15 F(tory stack.)144 722.4 Q(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735
E(6)203.725 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Tue Feb 4 09:39:00 2014
%%CreationDate: Mon Feb 24 08:28:31 2014
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
+5447
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4374,7 +4374,7 @@ without_job_control ()
void
end_job_control ()
{
if (interactive_shell) /* XXX - should it be interactive? */
if (interactive_shell || job_control) /* XXX - should it be just job_control? */
{
terminate_stopped_jobs ();
+4476
View File
File diff suppressed because it is too large Load Diff
+312 -609
View File
File diff suppressed because it is too large Load Diff
+6 -4
View File
@@ -933,10 +933,12 @@ exit_shell (s)
if (interactive_shell && login_shell && hup_on_exit)
hangup_all_jobs ();
/* If this shell is interactive, terminate all stopped jobs and
restore the original terminal process group. Don't do this if we're
in a subshell and calling exit_shell after, for example, a failed
word expansion. */
/* If this shell is interactive, or job control is active, terminate all
stopped jobs and restore the original terminal process group. Don't do
this if we're in a subshell and calling exit_shell after, for example,
a failed word expansion. We want to do this even if the shell is not
interactive because we set the terminal's process group when job control
is enabled regardless of the interactive status. */
if (subshell_environment == 0)
end_job_control ();
#endif /* JOB_CONTROL */
+1888
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -265,7 +265,7 @@ esac
${RMAIL} $SMARGS < "$TEMPFILE1" || {
cat "$TEMPFILE1" >> $HOME/dead.bashbug
echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2
echo "$0: mail to ${BUGADDR} failed: report saved in $HOME/dead.bashbug" >&2
}
exit 0
+3 -2
View File
@@ -646,8 +646,8 @@ unary_test (op, arg)
return (v && invisible_p (v) == 0 && var_isset (v) ? TRUE : FALSE);
case 'R':
v = find_variable (arg);
return (v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v) ? TRUE : FALSE);
v = find_variable_noref (arg);
return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE);
}
/* We can't actually get here, but this shuts up gcc. */
@@ -723,6 +723,7 @@ test_unop (op)
case 'o': case 'p': case 'r': case 's': case 't':
case 'u': case 'v': case 'w': case 'x': case 'z':
case 'G': case 'L': case 'O': case 'S': case 'N':
case 'R':
return (1);
}
+880
View File
@@ -0,0 +1,880 @@
/* test.c - GNU test program (ksb and mjb) */
/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
/* Copyright (C) 1987-2010 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
/* Define PATTERN_MATCHING to get the csh-like =~ and !~ pattern-matching
binary operators. */
/* #define PATTERN_MATCHING */
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
#include <stdio.h>
#include "bashtypes.h"
#if !defined (HAVE_LIMITS_H) && defined (HAVE_SYS_PARAM_H)
# include <sys/param.h>
#endif
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <errno.h>
#if !defined (errno)
extern int errno;
#endif /* !errno */
#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif /* !_POSIX_VERSION */
#include "posixstat.h"
#include "filecntl.h"
#include "stat-time.h"
#include "bashintl.h"
#include "shell.h"
#include "pathexp.h"
#include "test.h"
#include "builtins/common.h"
#include <glob/strmatch.h>
#if !defined (STRLEN)
# define STRLEN(s) ((s)[0] ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0)
#endif
#if !defined (STREQ)
# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0)
#endif /* !STREQ */
#define STRCOLLEQ(a, b) ((a)[0] == (b)[0] && strcoll ((a), (b)) == 0)
#if !defined (R_OK)
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
#endif /* R_OK */
#define EQ 0
#define NE 1
#define LT 2
#define GT 3
#define LE 4
#define GE 5
#define NT 0
#define OT 1
#define EF 2
/* The following few defines control the truth and false output of each stage.
TRUE and FALSE are what we use to compute the final output value.
SHELL_BOOLEAN is the form which returns truth or falseness in shell terms.
Default is TRUE = 1, FALSE = 0, SHELL_BOOLEAN = (!value). */
#define TRUE 1
#define FALSE 0
#define SHELL_BOOLEAN(value) (!(value))
#define TEST_ERREXIT_STATUS 2
static procenv_t test_exit_buf;
static int test_error_return;
#define test_exit(val) \
do { test_error_return = val; longjmp (test_exit_buf, 1); } while (0)
extern int sh_stat __P((const char *, struct stat *));
static int pos; /* The offset of the current argument in ARGV. */
static int argc; /* The number of arguments present in ARGV. */
static char **argv; /* The argument list. */
static int noeval;
static void test_syntax_error __P((char *, char *)) __attribute__((__noreturn__));
static void beyond __P((void)) __attribute__((__noreturn__));
static void integer_expected_error __P((char *)) __attribute__((__noreturn__));
static int unary_operator __P((void));
static int binary_operator __P((void));
static int two_arguments __P((void));
static int three_arguments __P((void));
static int posixtest __P((void));
static int expr __P((void));
static int term __P((void));
static int and __P((void));
static int or __P((void));
static int filecomp __P((char *, char *, int));
static int arithcomp __P((char *, char *, int, int));
static int patcomp __P((char *, char *, int));
static void
test_syntax_error (format, arg)
char *format, *arg;
{
builtin_error (format, arg);
test_exit (TEST_ERREXIT_STATUS);
}
/*
* beyond - call when we're beyond the end of the argument list (an
* error condition)
*/
static void
beyond ()
{
test_syntax_error (_("argument expected"), (char *)NULL);
}
/* Syntax error for when an integer argument was expected, but
something else was found. */
static void
integer_expected_error (pch)
char *pch;
{
test_syntax_error (_("%s: integer expression expected"), pch);
}
/* Increment our position in the argument list. Check that we're not
past the end of the argument list. This check is suppressed if the
argument is FALSE. Made a macro for efficiency. */
#define advance(f) do { ++pos; if (f && pos >= argc) beyond (); } while (0)
#define unary_advance() do { advance (1); ++pos; } while (0)
/*
* expr:
* or
*/
static int
expr ()
{
if (pos >= argc)
beyond ();
return (FALSE ^ or ()); /* Same with this. */
}
/*
* or:
* and
* and '-o' or
*/
static int
or ()
{
int value, v2;
value = and ();
if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'o' && !argv[pos][2])
{
advance (0);
v2 = or ();
return (value || v2);
}
return (value);
}
/*
* and:
* term
* term '-a' and
*/
static int
and ()
{
int value, v2;
value = term ();
if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'a' && !argv[pos][2])
{
advance (0);
v2 = and ();
return (value && v2);
}
return (value);
}
/*
* term - parse a term and return 1 or 0 depending on whether the term
* evaluates to true or false, respectively.
*
* term ::=
* '-'('a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'k'|'p'|'r'|'s'|'u'|'w'|'x') filename
* '-'('G'|'L'|'O'|'S'|'N') filename
* '-t' [int]
* '-'('z'|'n') string
* '-o' option
* string
* string ('!='|'='|'==') string
* <int> '-'(eq|ne|le|lt|ge|gt) <int>
* file '-'(nt|ot|ef) file
* '(' <expr> ')'
* int ::=
* positive and negative integers
*/
static int
term ()
{
int value;
if (pos >= argc)
beyond ();
/* Deal with leading `not's. */
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
value = 0;
while (pos < argc && argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = 1 - value;
}
return (value ? !term() : term());
}
/* A paren-bracketed argument. */
if (argv[pos][0] == '(' && argv[pos][1] == '\0') /* ) */
{
advance (1);
value = expr ();
if (argv[pos] == 0) /* ( */
test_syntax_error (_("`)' expected"), (char *)NULL);
else if (argv[pos][0] != ')' || argv[pos][1]) /* ( */
test_syntax_error (_("`)' expected, found %s"), argv[pos]);
advance (0);
return (value);
}
/* are there enough arguments left that this could be dyadic? */
if ((pos + 3 <= argc) && test_binop (argv[pos + 1]))
value = binary_operator ();
/* Might be a switch type argument */
else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
{
if (test_unop (argv[pos]))
value = unary_operator ();
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
{
value = argv[pos][0] != '\0';
advance (0);
}
return (value);
}
static int
stat_mtime (fn, st, ts)
char *fn;
struct stat *st;
struct timespec *ts;
{
int r;
r = sh_stat (fn, st);
if (r < 0)
return r;
*ts = get_stat_mtime (st);
return 0;
}
static int
filecomp (s, t, op)
char *s, *t;
int op;
{
struct stat st1, st2;
struct timespec ts1, ts2;
int r1, r2;
if ((r1 = stat_mtime (s, &st1, &ts1)) < 0)
{
if (op == EF)
return (FALSE);
}
if ((r2 = stat_mtime (t, &st2, &ts2)) < 0)
{
if (op == EF)
return (FALSE);
}
switch (op)
{
case OT: return (r1 < r2 || (r2 == 0 && timespec_cmp (ts1, ts2) < 0));
case NT: return (r1 > r2 || (r1 == 0 && timespec_cmp (ts1, ts2) > 0));
case EF: return (same_file (s, t, &st1, &st2));
}
return (FALSE);
}
static int
arithcomp (s, t, op, flags)
char *s, *t;
int op, flags;
{
intmax_t l, r;
int expok;
if (flags & TEST_ARITHEXP)
{
l = evalexp (s, &expok);
if (expok == 0)
return (FALSE); /* should probably longjmp here */
r = evalexp (t, &expok);
if (expok == 0)
return (FALSE); /* ditto */
}
else
{
if (legal_number (s, &l) == 0)
integer_expected_error (s);
if (legal_number (t, &r) == 0)
integer_expected_error (t);
}
switch (op)
{
case EQ: return (l == r);
case NE: return (l != r);
case LT: return (l < r);
case GT: return (l > r);
case LE: return (l <= r);
case GE: return (l >= r);
}
return (FALSE);
}
static int
patcomp (string, pat, op)
char *string, *pat;
int op;
{
int m;
m = strmatch (pat, string, FNMATCH_EXTFLAG|FNMATCH_IGNCASE);
return ((op == EQ) ? (m == 0) : (m != 0));
}
int
binary_test (op, arg1, arg2, flags)
char *op, *arg1, *arg2;
int flags;
{
int patmatch;
patmatch = (flags & TEST_PATMATCH);
if (op[0] == '=' && (op[1] == '\0' || (op[1] == '=' && op[2] == '\0')))
return (patmatch ? patcomp (arg1, arg2, EQ) : STREQ (arg1, arg2));
else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0')
{
#if defined (HAVE_STRCOLL)
if (shell_compatibility_level > 40 && flags & TEST_LOCALE)
return ((op[0] == '>') ? (strcoll (arg1, arg2) > 0) : (strcoll (arg1, arg2) < 0));
else
#endif
return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0));
}
else if (op[0] == '!' && op[1] == '=' && op[2] == '\0')
return (patmatch ? patcomp (arg1, arg2, NE) : (STREQ (arg1, arg2) == 0));
else if (op[2] == 't')
{
switch (op[1])
{
case 'n': return (filecomp (arg1, arg2, NT)); /* -nt */
case 'o': return (filecomp (arg1, arg2, OT)); /* -ot */
case 'l': return (arithcomp (arg1, arg2, LT, flags)); /* -lt */
case 'g': return (arithcomp (arg1, arg2, GT, flags)); /* -gt */
}
}
else if (op[1] == 'e')
{
switch (op[2])
{
case 'f': return (filecomp (arg1, arg2, EF)); /* -ef */
case 'q': return (arithcomp (arg1, arg2, EQ, flags)); /* -eq */
}
}
else if (op[2] == 'e')
{
switch (op[1])
{
case 'n': return (arithcomp (arg1, arg2, NE, flags)); /* -ne */
case 'g': return (arithcomp (arg1, arg2, GE, flags)); /* -ge */
case 'l': return (arithcomp (arg1, arg2, LE, flags)); /* -le */
}
}
return (FALSE); /* should never get here */
}
static int
binary_operator ()
{
int value;
char *w;
w = argv[pos + 1];
if ((w[0] == '=' && (w[1] == '\0' || (w[1] == '=' && w[2] == '\0'))) || /* =, == */
((w[0] == '>' || w[0] == '<') && w[1] == '\0') || /* <, > */
(w[0] == '!' && w[1] == '=' && w[2] == '\0')) /* != */
{
value = binary_test (w, argv[pos], argv[pos + 2], 0);
pos += 3;
return (value);
}
#if defined (PATTERN_MATCHING)
if ((w[0] == '=' || w[0] == '!') && w[1] == '~' && w[2] == '\0')
{
value = patcomp (argv[pos], argv[pos + 2], w[0] == '=' ? EQ : NE);
pos += 3;
return (value);
}
#endif
if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0)
{
test_syntax_error (_("%s: binary operator expected"), w);
/* NOTREACHED */
return (FALSE);
}
value = binary_test (w, argv[pos], argv[pos + 2], 0);
pos += 3;
return value;
}
static int
unary_operator ()
{
char *op;
intmax_t r;
op = argv[pos];
if (test_unop (op) == 0)
return (FALSE);
/* the only tricky case is `-t', which may or may not take an argument. */
if (op[1] == 't')
{
advance (0);
if (pos < argc)
{
if (legal_number (argv[pos], &r))
{
advance (0);
return (unary_test (op, argv[pos - 1]));
}
else
return (FALSE);
}
else
return (unary_test (op, "1"));
}
/* All of the unary operators take an argument, so we first call
unary_advance (), which checks to make sure that there is an
argument, and then advances pos right past it. This means that
pos - 1 is the location of the argument. */
unary_advance ();
return (unary_test (op, argv[pos - 1]));
}
int
unary_test (op, arg)
char *op, *arg;
{
intmax_t r;
struct stat stat_buf;
SHELL_VAR *v;
switch (op[1])
{
case 'a': /* file exists in the file system? */
case 'e':
return (sh_stat (arg, &stat_buf) == 0);
case 'r': /* file is readable? */
return (sh_eaccess (arg, R_OK) == 0);
case 'w': /* File is writeable? */
return (sh_eaccess (arg, W_OK) == 0);
case 'x': /* File is executable? */
return (sh_eaccess (arg, X_OK) == 0);
case 'O': /* File is owned by you? */
return (sh_stat (arg, &stat_buf) == 0 &&
(uid_t) current_user.euid == (uid_t) stat_buf.st_uid);
case 'G': /* File is owned by your group? */
return (sh_stat (arg, &stat_buf) == 0 &&
(gid_t) current_user.egid == (gid_t) stat_buf.st_gid);
case 'N':
return (sh_stat (arg, &stat_buf) == 0 &&
stat_buf.st_atime <= stat_buf.st_mtime);
case 'f': /* File is a file? */
if (sh_stat (arg, &stat_buf) < 0)
return (FALSE);
/* -f is true if the given file exists and is a regular file. */
#if defined (S_IFMT)
return (S_ISREG (stat_buf.st_mode) || (stat_buf.st_mode & S_IFMT) == 0);
#else
return (S_ISREG (stat_buf.st_mode));
#endif /* !S_IFMT */
case 'd': /* File is a directory? */
return (sh_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode)));
case 's': /* File has something in it? */
return (sh_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0);
case 'S': /* File is a socket? */
#if !defined (S_ISSOCK)
return (FALSE);
#else
return (sh_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode));
#endif /* S_ISSOCK */
case 'c': /* File is character special? */
return (sh_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode));
case 'b': /* File is block special? */
return (sh_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode));
case 'p': /* File is a named pipe? */
#ifndef S_ISFIFO
return (FALSE);
#else
return (sh_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode));
#endif /* S_ISFIFO */
case 'L': /* Same as -h */
case 'h': /* File is a symbolic link? */
#if !defined (S_ISLNK) || !defined (HAVE_LSTAT)
return (FALSE);
#else
return ((arg[0] != '\0') &&
(lstat (arg, &stat_buf) == 0) && S_ISLNK (stat_buf.st_mode));
#endif /* S_IFLNK && HAVE_LSTAT */
case 'u': /* File is setuid? */
return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0);
case 'g': /* File is setgid? */
return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0);
case 'k': /* File has sticky bit set? */
#if !defined (S_ISVTX)
/* This is not Posix, and is not defined on some Posix systems. */
return (FALSE);
#else
return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0);
#endif
case 't': /* File fd is a terminal? */
if (legal_number (arg, &r) == 0)
return (FALSE);
return ((r == (int)r) && isatty ((int)r));
case 'n': /* True if arg has some length. */
return (arg[0] != '\0');
case 'z': /* True if arg has no length. */
return (arg[0] == '\0');
case 'o': /* True if option `arg' is set. */
return (minus_o_option_value (arg) == 1);
case 'v':
v = find_variable (arg);
#if defined (ARRAY_VARS)
if (v == 0 && valid_array_reference (arg))
{
char *t;
t = array_value (arg, 0, 0, (int *)0, (arrayind_t *)0);
return (t ? TRUE : FALSE);
}
else if (v && invisible_p (v) == 0 && array_p (v))
{
char *t;
/* [[ -v foo ]] == [[ -v foo[0] ]] */
t = array_reference (array_cell (v), 0);
return (t ? TRUE : FALSE);
}
else if (v && invisible_p (v) == 0 && assoc_p (v))
{
char *t;
t = assoc_reference (assoc_cell (v), "0");
return (t ? TRUE : FALSE);
}
#endif
return (v && invisible_p (v) == 0 && var_isset (v) ? TRUE : FALSE);
case 'R':
v = find_variable (arg);
return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE);
}
/* We can't actually get here, but this shuts up gcc. */
return (FALSE);
}
/* Return TRUE if OP is one of the test command's binary operators. */
int
test_binop (op)
char *op;
{
if (op[0] == '=' && op[1] == '\0')
return (1); /* '=' */
else if ((op[0] == '<' || op[0] == '>') && op[1] == '\0') /* string <, > */
return (1);
else if ((op[0] == '=' || op[0] == '!') && op[1] == '=' && op[2] == '\0')
return (1); /* `==' and `!=' */
#if defined (PATTERN_MATCHING)
else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!'))
return (1);
#endif
else if (op[0] != '-' || op[2] == '\0' || op[3] != '\0')
return (0);
else
{
if (op[2] == 't')
switch (op[1])
{
case 'n': /* -nt */
case 'o': /* -ot */
case 'l': /* -lt */
case 'g': /* -gt */
return (1);
default:
return (0);
}
else if (op[1] == 'e')
switch (op[2])
{
case 'q': /* -eq */
case 'f': /* -ef */
return (1);
default:
return (0);
}
else if (op[2] == 'e')
switch (op[1])
{
case 'n': /* -ne */
case 'g': /* -ge */
case 'l': /* -le */
return (1);
default:
return (0);
}
else
return (0);
}
}
/* Return non-zero if OP is one of the test command's unary operators. */
int
test_unop (op)
char *op;
{
if (op[0] != '-' || op[2] != 0)
return (0);
switch (op[1])
{
case 'a': case 'b': case 'c': case 'd': case 'e':
case 'f': case 'g': case 'h': case 'k': case 'n':
case 'o': case 'p': case 'r': case 's': case 't':
case 'u': case 'v': case 'w': case 'x': case 'z':
case 'G': case 'L': case 'O': case 'S': case 'N':
case 'R':
return (1);
}
return (0);
}
static int
two_arguments ()
{
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
return (argv[pos + 1][0] == '\0');
else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
{
if (test_unop (argv[pos]))
return (unary_operator ());
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
return (0);
}
#define ANDOR(s) (s[0] == '-' && !s[2] && (s[1] == 'a' || s[1] == 'o'))
/* This could be augmented to handle `-t' as equivalent to `-t 1', but
POSIX requires that `-t' be given an argument. */
#define ONE_ARG_TEST(s) ((s)[0] != '\0')
static int
three_arguments ()
{
int value;
if (test_binop (argv[pos+1]))
{
value = binary_operator ();
pos = argc;
}
else if (ANDOR (argv[pos+1]))
{
if (argv[pos+1][1] == 'a')
value = ONE_ARG_TEST(argv[pos]) && ONE_ARG_TEST(argv[pos+2]);
else
value = ONE_ARG_TEST(argv[pos]) || ONE_ARG_TEST(argv[pos+2]);
pos = argc;
}
else if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = !two_arguments ();
}
else if (argv[pos][0] == '(' && argv[pos+2][0] == ')')
{
value = ONE_ARG_TEST(argv[pos+1]);
pos = argc;
}
else
test_syntax_error (_("%s: binary operator expected"), argv[pos+1]);
return (value);
}
/* This is an implementation of a Posix.2 proposal by David Korn. */
static int
posixtest ()
{
int value;
switch (argc - 1) /* one extra passed in */
{
case 0:
value = FALSE;
pos = argc;
break;
case 1:
value = ONE_ARG_TEST(argv[1]);
pos = argc;
break;
case 2:
value = two_arguments ();
pos = argc;
break;
case 3:
value = three_arguments ();
break;
case 4:
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = !three_arguments ();
break;
}
/* FALLTHROUGH */
default:
value = expr ();
}
return (value);
}
/*
* [:
* '[' expr ']'
* test:
* test expr
*/
int
test_command (margc, margv)
int margc;
char **margv;
{
int value;
int code;
USE_VAR(margc);
code = setjmp_nosigs (test_exit_buf);
if (code)
return (test_error_return);
argv = margv;
if (margv[0] && margv[0][0] == '[' && margv[0][1] == '\0')
{
--margc;
if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1]))
test_syntax_error (_("missing `]'"), (char *)NULL);
if (margc < 2)
test_exit (SHELL_BOOLEAN (FALSE));
}
argc = margc;
pos = 1;
if (pos >= argc)
test_exit (SHELL_BOOLEAN (FALSE));
noeval = 0;
value = posixtest ();
if (pos != argc)
test_syntax_error (_("too many arguments"), (char *)NULL);
test_exit (SHELL_BOOLEAN (value));
}
+4 -2
View File
@@ -920,7 +920,8 @@ _run_trap_internal (sig, tag)
subst_assign_varlist = 0;
#if defined (JOB_CONTROL)
save_pipeline (1); /* XXX only provides one save level */
if (sig != DEBUG_TRAP) /* run_debug_trap does this */
save_pipeline (1); /* XXX only provides one save level */
#endif
/* If we're in a function, make sure return longjmps come here, too. */
@@ -940,7 +941,8 @@ _run_trap_internal (sig, tag)
trap_exit_value = last_command_exit_value;
#if defined (JOB_CONTROL)
restore_pipeline (1);
if (sig != DEBUG_TRAP) /* run_debug_trap does this */
restore_pipeline (1);
#endif
subst_assign_varlist = save_subst_varlist;