commit bash-20050428 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:46:16 -05:00
parent 4f00fe31d0
commit 3ffb039ac2
22 changed files with 28615 additions and 153 deletions
+37
View File
@@ -11332,3 +11332,40 @@ builtins/read.def
redir.c
- fix redir_open so that the repeat open on failure that AFS support
adds restores the correct value of errno for any error message
4/26
----
Makefile.in
- make sure mksignames and mksyntax are invoked with the $(EXEEXT)
extension
4/28
----
lib/readline/readline.h
- new state variable: RL_STATE_CALLBACK, means readline is using the
callback interface
lib/readline/callback.c
- set RL_STATE_CALLBACK in rl_callback_handler_install, unset in
rl_callback_handler_remove
4/29
----
config-top.h
- DONT_REPORT_SIGPIPE is now on by default, since it apparently
interferes with scripts
configure.in
- arrange things so PGRP_PIPE is defined on Linux-2.4+ and version 3
kernels (ones that apparently schedule children to run before their
parent)
4/30
----
builtins/caller.def
- add call to no_options, so it can handle `--' option
doc/{bash.1,bashref.texi}
- note explicitly that test, :, true, and false don't understand --
as meaning the end of options
+45
View File
@@ -11320,3 +11320,48 @@ builtins/ulimit.def
execute_cmd.c
- add cm_function_def to the list of control structures for which
child processes are forked when pipes come in or out
4/14
----
builtins/read.def
- make sure the ^As added for internal quoting are not counted as
characters read when -n is supplied
4/20
----
redir.c
- fix redir_open so that the repeat open on failure that AFS support
adds restores the correct value of errno for any error message
4/26
----
Makefile.in
- make sure mksignames and mksyntax are invoked with the $(EXEEXT)
extension
4/28
----
lib/readline/readline.h
- new state variable: RL_STATE_CALLBACK, means readline is using the
callback interface
lib/readline/callback.c
- set RL_STATE_CALLBACK in rl_callback_handler_install, unset in
rl_callback_handler_remove
4/29
----
config-top.h
- DONT_REPORT_SIGPIPE is now on by default, since it apparently
interferes with scripts
configure.in
- arrange things so PGRP_PIPE is defined on Linux-2.4+ and version 3
kernels (ones that apparently schedule children to run before their
parent)
4/30
----
builtins/caller.def
- add call to no_options, so it can handle `--' option
+2 -2
View File
@@ -619,7 +619,7 @@ mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartype
# *not* cross-compiling
lsignames.h: mksignames$(EXEEXT)
$(RM) $@
./mksignames $@
./mksignames$(EXEEXT) $@
# copy the correct signames header file to signames.h
signames.h: $(SIGNAMES_H)
@@ -627,7 +627,7 @@ signames.h: $(SIGNAMES_H)
syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h
$(RM) $@
./mksyntax -o $@
./mksyntax$(EXEEXT) -o $@
$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h
@(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1
+8 -2
View File
@@ -1,5 +1,5 @@
@%:@! /bin/sh
@%:@ From configure.in for Bash 3.1, version 3.174, from autoconf version AC_ACVERSION.
@%:@ From configure.in for Bash 3.1, version 3.175, from autoconf version AC_ACVERSION.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.59 for bash 3.1-devel.
@%:@
@@ -26511,7 +26511,13 @@ sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
case "`uname -r`" in
2.[456789]*|3*) cat >>confdefs.h <<\_ACEOF
@%:@define PGRP_PIPE 1
_ACEOF
;;
esac ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+87 -87
View File
@@ -15,101 +15,101 @@
'configure.in'
],
{
'AC_PROG_RANLIB' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_PROG_YACC' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_SUBST' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_C_INLINE' => 1,
'm4_pattern_forbid' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_FUNC_ALLOCA' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_INIT' => 1,
'AC_PROG_CXX' => 1,
'AC_CHECK_FUNCS' => 1,
'AC_PROG_LEX' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_TYPE_PID_T' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'm4_pattern_allow' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_HEADER_STDC' => 1,
'AC_PROG_INSTALL' => 1,
'AC_TYPE_UID_T' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_CPP' => 1,
'AM_CONDITIONAL' => 1,
'AC_PATH_X' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_HEADER_STAT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'm4_sinclude' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_LIBSOURCE' => 1,
'AC_CONFIG_HEADERS' => 1,
'include' => 1,
'AC_FUNC_LSTAT' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_INIT' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_FUNC_STRFTIME' => 1,
'sinclude' => 1,
'AC_TYPE_MODE_T' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_CONFIG_FILES' => 1,
'AC_FUNC_MMAP' => 1,
'AC_STRUCT_TM' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CHECK_HEADERS' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CHECK_TYPES' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_STRERROR_R' => 1,
'm4_include' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_HEADER_TIME' => 1,
'AC_PROG_LEX' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_C_CONST' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_CHECK_TYPES' => 1,
'AC_CHECK_FUNCS' => 1,
'AC_PROG_AWK' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'm4_pattern_forbid' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_CHECK_LIB' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_FUNC_OBSTACK' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_FORK' => 1,
'AC_PROG_AWK' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'_m4_warn' => 1,
'AC_PROG_YACC' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_C_INLINE' => 1,
'AC_HEADER_STDC' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_C_CONST' => 1,
'AC_TYPE_UID_T' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_PROG_RANLIB' => 1,
'AM_CONDITIONAL' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_PROG_CXX' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_FUNC_OBSTACK' => 1,
'sinclude' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_STRUCT_TM' => 1,
'AC_PROG_CPP' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_CANONICAL_HOST' => 1,
'include' => 1,
'_m4_warn' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PATH_X' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_CC' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CONFIG_FILES' => 1,
'm4_sinclude' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_C_VOLATILE' => 1,
'AC_HEADER_TIME' => 1
'AC_CONFIG_LINKS' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_FUNC_MMAP' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'm4_include' => 1,
'AC_PROG_INSTALL' => 1,
'AC_SUBST' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_FUNC_STAT' => 1
}
], 'Autom4te::Request' )
);
+29 -28
View File
@@ -1771,37 +1771,38 @@ m4trace:configure.in:959: -1- AC_DEFINE_TRACE_LITERAL([SVR4_2])
m4trace:configure.in:960: -1- AC_DEFINE_TRACE_LITERAL([SVR4])
m4trace:configure.in:961: -1- AC_DEFINE_TRACE_LITERAL([SVR4])
m4trace:configure.in:962: -1- AC_DEFINE_TRACE_LITERAL([SVR5])
m4trace:configure.in:1019: -1- AC_SUBST([SHOBJ_CC])
m4trace:configure.in:1020: -1- AC_SUBST([SHOBJ_CFLAGS])
m4trace:configure.in:1021: -1- AC_SUBST([SHOBJ_LD])
m4trace:configure.in:1022: -1- AC_SUBST([SHOBJ_LDFLAGS])
m4trace:configure.in:1023: -1- AC_SUBST([SHOBJ_XLDFLAGS])
m4trace:configure.in:1024: -1- AC_SUBST([SHOBJ_LIBS])
m4trace:configure.in:1025: -1- AC_SUBST([SHOBJ_STATUS])
m4trace:configure.in:1050: -1- AC_SUBST([PROFILE_FLAGS])
m4trace:configure.in:1052: -1- AC_SUBST([incdir])
m4trace:configure.in:1053: -1- AC_SUBST([BUILD_DIR])
m4trace:configure.in:1055: -1- AC_SUBST([YACC])
m4trace:configure.in:1056: -1- AC_SUBST([AR])
m4trace:configure.in:1057: -1- AC_SUBST([ARFLAGS])
m4trace:configure.in:1059: -1- AC_SUBST([BASHVERS])
m4trace:configure.in:1060: -1- AC_SUBST([RELSTATUS])
m4trace:configure.in:1061: -1- AC_SUBST([DEBUG])
m4trace:configure.in:1062: -1- AC_SUBST([MALLOC_DEBUG])
m4trace:configure.in:1064: -1- AC_SUBST([host_cpu])
m4trace:configure.in:1065: -1- AC_SUBST([host_vendor])
m4trace:configure.in:1066: -1- AC_SUBST([host_os])
m4trace:configure.in:1068: -1- AC_SUBST([LOCAL_LIBS])
m4trace:configure.in:1069: -1- AC_SUBST([LOCAL_CFLAGS])
m4trace:configure.in:1070: -1- AC_SUBST([LOCAL_LDFLAGS])
m4trace:configure.in:1071: -1- AC_SUBST([LOCAL_DEFS])
m4trace:configure.in:1085: -1- AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
m4trace:configure.in:977: -1- AC_DEFINE_TRACE_LITERAL([PGRP_PIPE])
m4trace:configure.in:1022: -1- AC_SUBST([SHOBJ_CC])
m4trace:configure.in:1023: -1- AC_SUBST([SHOBJ_CFLAGS])
m4trace:configure.in:1024: -1- AC_SUBST([SHOBJ_LD])
m4trace:configure.in:1025: -1- AC_SUBST([SHOBJ_LDFLAGS])
m4trace:configure.in:1026: -1- AC_SUBST([SHOBJ_XLDFLAGS])
m4trace:configure.in:1027: -1- AC_SUBST([SHOBJ_LIBS])
m4trace:configure.in:1028: -1- AC_SUBST([SHOBJ_STATUS])
m4trace:configure.in:1053: -1- AC_SUBST([PROFILE_FLAGS])
m4trace:configure.in:1055: -1- AC_SUBST([incdir])
m4trace:configure.in:1056: -1- AC_SUBST([BUILD_DIR])
m4trace:configure.in:1058: -1- AC_SUBST([YACC])
m4trace:configure.in:1059: -1- AC_SUBST([AR])
m4trace:configure.in:1060: -1- AC_SUBST([ARFLAGS])
m4trace:configure.in:1062: -1- AC_SUBST([BASHVERS])
m4trace:configure.in:1063: -1- AC_SUBST([RELSTATUS])
m4trace:configure.in:1064: -1- AC_SUBST([DEBUG])
m4trace:configure.in:1065: -1- AC_SUBST([MALLOC_DEBUG])
m4trace:configure.in:1067: -1- AC_SUBST([host_cpu])
m4trace:configure.in:1068: -1- AC_SUBST([host_vendor])
m4trace:configure.in:1069: -1- AC_SUBST([host_os])
m4trace:configure.in:1071: -1- AC_SUBST([LOCAL_LIBS])
m4trace:configure.in:1072: -1- AC_SUBST([LOCAL_CFLAGS])
m4trace:configure.in:1073: -1- AC_SUBST([LOCAL_LDFLAGS])
m4trace:configure.in:1074: -1- AC_SUBST([LOCAL_DEFS])
m4trace:configure.in:1088: -1- AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
lib/intl/Makefile \
lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \
examples/loadables/Makefile examples/loadables/perl/Makefile \
pathnames.h])
m4trace:configure.in:1085: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
m4trace:configure.in:1088: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], [])
m4trace:configure.in:1085: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:1085: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.in:1088: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.in:1088: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+5
View File
@@ -55,6 +55,7 @@ $END
#include "../shell.h"
#include "common.h"
#include "builtext.h"
#include "bashgetopt.h"
#ifdef LOADABLE_BUILTIN
# include "builtins.h"
@@ -88,6 +89,10 @@ caller_builtin (list)
if (bash_source_a == 0 || array_empty (bash_source_a))
return (EXECUTION_FAILURE);
if (no_options (list))
return (EX_USAGE);
list = loptend; /* skip over possible `--' */
/* If there is no argument list, then give short form: line filename. */
if (list == 0)
{
+147
View File
@@ -0,0 +1,147 @@
This file is caller.def, from which is created caller.c. It implements the
builtin "caller" in Bash.
Copyright (C) 2002-2003 Rocky Bernstein for 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 2, 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; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$PRODUCES caller.c
$BUILTIN caller
$FUNCTION caller_builtin
$DEPENDS_ON DEBUGGER
$SHORT_DOC caller [EXPR]
Returns the context of the current subroutine call.
Without EXPR, returns returns "$line $filename". With EXPR,
returns "$line $subroutine $filename"; this extra information
can be used used to provide a stack trace.
The value of EXPR indicates how many call frames to go back before the
current one; the top frame is frame 0.
$END
#include <config.h>
#include <stdio.h>
#include "chartypes.h"
#include "bashtypes.h"
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX
# include <sys/types.h>
# endif
# include <unistd.h>
#endif
#include <errno.h>
#include "../bashintl.h"
#include "../shell.h"
#include "common.h"
#include "builtext.h"
#ifdef LOADABLE_BUILTIN
# include "builtins.h"
#endif
#if !defined (errno)
extern int errno;
#endif /* !errno */
int
caller_builtin (list)
WORD_LIST *list;
{
#if !defined (ARRAY_VARS)
printf ("1 NULL\n");
return (EXECUTION_FAILURE);
#else
SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
char *funcname_s, *source_s, *lineno_s;
ARRAY_ELEMENT *ae;
intmax_t num;
GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a);
if (bash_lineno_a == 0 || array_empty (bash_lineno_a))
return (EXECUTION_FAILURE);
if (bash_source_a == 0 || array_empty (bash_source_a))
return (EXECUTION_FAILURE);
/* If there is no argument list, then give short form: line filename. */
if (list == 0)
{
lineno_s = array_reference (bash_lineno_a, 0);
source_s = array_reference (bash_source_a, 1);
printf("%s %s\n", lineno_s ? lineno_s : "NULL", source_s ? source_s : "NULL");
return (EXECUTION_SUCCESS);
}
if (funcname_a == 0 || array_empty (funcname_a))
return (EXECUTION_FAILURE);
if (legal_number (list->word->word, &num))
{
lineno_s = array_reference (bash_lineno_a, num);
source_s = array_reference (bash_source_a, num+1);
funcname_s = array_reference (funcname_a, num+1);
if (lineno_s == NULL|| source_s == NULL || funcname_s == NULL)
return (EXECUTION_FAILURE);
printf("%s %s %s\n", lineno_s, funcname_s, source_s);
}
else
{
sh_invalidnum (list->word->word);
builtin_usage ();
return (EXECUTION_FAILURE);
}
return (EXECUTION_SUCCESS);
#endif
}
#ifdef LOADABLE_BUILTIN
static char *caller_doc[] = {
N_("Returns the context of the current subroutine call."),
N_(""),
N_("Without EXPR, returns returns \"$line $filename\". With EXPR,"),
N_("returns \"$line $subroutine $filename\"; this extra information"),
N_("can be used used to provide a stack trace."),
N_(""),
N_("The value of EXPR indicates how many call frames to go back before the"),
N_("current one; the top frame is frame 0."),
(char *)NULL
};
struct builtin caller_struct = {
"caller",
caller_builtin,
BUILTIN_ENABLED,
caller_doc,
"caller [EXPR]",
0
};
#endif /* LOADABLE_BUILTIN */
+1 -1
View File
@@ -47,7 +47,7 @@
/* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages
when a job like `cat jobs.c | exit 1' is executed. */
/* #define DONT_REPORT_SIGPIPE */
#define DONT_REPORT_SIGPIPE
/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
+87
View File
@@ -0,0 +1,87 @@
/* config-top.h */
/* This contains various user-settable options not under the control of
autoconf. */
/* Copyright (C) 2002 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 2, 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; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
/* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to
continue processing arguments after one of them fails. This is
what POSIX.2 specifies. */
#define CONTINUE_AFTER_KILL_ERROR
/* Define BREAK_COMPLAINS if you want the non-standard, but useful
error messages about `break' and `continue' out of context. */
#define BREAK_COMPLAINS
/* Define BUFFERED_INPUT if you want the shell to do its own input
buffering, rather than using stdio. Do not undefine this; it's
required to preserve semantics required by POSIX. */
#define BUFFERED_INPUT
/* Define ONESHOT if you want sh -c 'command' to avoid forking to execute
`command' whenever possible. This is a big efficiency improvement. */
#define ONESHOT
/* Define V9_ECHO if you want to give the echo builtin backslash-escape
interpretation using the -e option, in the style of the Bell Labs 9th
Edition version of echo. You cannot emulate the System V echo behavior
without this option. */
#define V9_ECHO
/* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages
when a job like `cat jobs.c | exit 1' is executed. */
/* #define DONT_REPORT_SIGPIPE */
/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
#define DEFAULT_PATH_VALUE \
"/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
#endif
/* The value for PATH when invoking `command -p'. This is only used when
the Posix.2 confstr () function, or CS_PATH define are not present. */
#ifndef STANDARD_UTILS_PATH
#define STANDARD_UTILS_PATH \
"/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
#endif
/* Default primary and secondary prompt strings. */
#define PPROMPT "\\s-\\v\\$ "
#define SPROMPT "> "
/* Undefine this if you don't want the ksh-compatible behavior of reprinting
the select menu after a valid choice is made only if REPLY is set to NULL
in the body of the select command. The menu is always reprinted if the
reply to the select query is an empty line. */
#define KSH_COMPATIBLE_SELECT
/* System-wide .bashrc file for interactive shells. */
/* #define SYS_BASHRC "/etc/bash.bashrc" */
/* System-wide .bash_logout for login shells. */
/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
/* Define this to make non-interactive shells begun with argv[0][0] == '-'
run the startup files when not in posix mode. */
/* #define NON_INTERACTIVE_LOGIN_SHELLS */
/* Define this if you want bash to try to check whether it's being run by
sshd and source the .bashrc if so (like the rshd behavior). */
/* #define SSH_SOURCE_BASHRC */
Vendored
+8 -2
View File
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in for Bash 3.1, version 3.174, from autoconf version AC_ACVERSION.
# From configure.in for Bash 3.1, version 3.175, from autoconf version AC_ACVERSION.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for bash 3.1-devel.
#
@@ -26511,7 +26511,13 @@ sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
case "`uname -r`" in
2.[456789]*|3*) cat >>confdefs.h <<\_ACEOF
#define PGRP_PIPE 1
_ACEOF
;;
esac ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+5 -2
View File
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_REVISION([for Bash 3.1, version 3.174, from autoconf version] AC_ACVERSION)dnl
AC_REVISION([for Bash 3.1, version 3.175, from autoconf version] AC_ACVERSION)dnl
define(bashvers, 3.1)
define(relstatus, devel)
@@ -972,7 +972,10 @@ sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
case "`uname -r`" in
2.[[456789]]*|3*) AC_DEFINE(PGRP_PIPE) ;;
esac ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+7 -2
View File
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_REVISION([for Bash 3.1, version 3.174, from autoconf version] AC_ACVERSION)dnl
AC_REVISION([for Bash 3.1, version 3.175, from autoconf version] AC_ACVERSION)dnl
define(bashvers, 3.1)
define(relstatus, devel)
@@ -494,6 +494,7 @@ if test $opt_readline = yes; then
;;
esac
READLINE_DEP=
READLINE_LIB=-lreadline
else
RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
READLINE_DEP='$(READLINE_LIBRARY)'
@@ -520,6 +521,7 @@ if test $opt_history = yes || test $opt_bang_history = yes; then
if test "$opt_with_installed_readline" != "no"; then
HIST_LIBDIR=$RL_LIBDIR
HISTORY_DEP=
HISTORY_LIB=-lhistory
case "$opt_with_installed_readline" in
yes) RL_INCLUDE= ;;
*) case "$RL_INCLUDEDIR" in
@@ -970,7 +972,10 @@ sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
case "`uname -r`" in
2.[456789]*|3*) AC_DEFINE(PGRP_PIPE) ;;
esac ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
Executable
+28091
View File
File diff suppressed because it is too large Load Diff
+7 -5
View File
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.CWRU.Edu
.\"
.\" Last Change: Wed Mar 23 21:06:23 EST 2005
.\" Last Change: Sat Apr 30 19:09:18 EDT 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2005 Mar 23" "GNU Bash-3.1-devel"
.TH BASH 1 "2005 Apr 30" "GNU Bash-3.1-devel"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -5887,6 +5887,8 @@ section as accepting options preceded by
accepts
.B \-\-
to signify the end of the options.
For example, the \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP builtins
do not accept options.
.sp .5
.PD 0
.TP
@@ -6582,9 +6584,7 @@ The \fBxpg_echo\fP shell option may be used to
dynamically determine whether or not \fBecho\fP expands these
escape characters by default.
.B echo
does not interpret
.B \-\-
to mean the end of options.
does not interpret \fB\-\-\fP to mean the end of options.
.B echo
interprets the following escape sequences:
.RS
@@ -8201,6 +8201,8 @@ Each operator and operand must be a separate argument.
Expressions are composed of the primaries described above under
.SM
.BR "CONDITIONAL EXPRESSIONS" .
\fBtest\fP does not accept any options, nor does it accept and ignore
an argument of \fB\-\-\fP as signifying the end of options.
.if t .sp 0.5
.if n .sp 1
Expressions may be combined using the following operators, listed
+19 -6
View File
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.CWRU.Edu
.\"
.\" Last Change: Sat Feb 19 17:38:29 EST 2005
.\" Last Change: Wed Mar 23 21:06:23 EST 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2005 Feb 19" "GNU Bash-3.1-devel"
.TH BASH 1 "2005 Mar 23" "GNU Bash-3.1-devel"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -2103,6 +2103,8 @@ The
.B unset
builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP]
destroys the array element at index \fIsubscript\fP.
Care must be taken to avoid unwanted side effects caused by filename
generation.
\fBunset\fP \fIname\fP, where \fIname\fP is an array, or
\fBunset\fP \fIname\fP[\fIsubscript\fP], where
\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array.
@@ -5885,6 +5887,8 @@ section as accepting options preceded by
accepts
.B \-\-
to signify the end of the options.
For example, the \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP builtins
do not accept options.
.sp .5
.PD 0
.TP
@@ -6580,9 +6584,7 @@ The \fBxpg_echo\fP shell option may be used to
dynamically determine whether or not \fBecho\fP expands these
escape characters by default.
.B echo
does not interpret
.B \-\-
to mean the end of options.
does not interpret \fB\-\-\fP to mean the end of options.
.B echo
interprets the following escape sequences:
.RS
@@ -7290,7 +7292,7 @@ is empty, a non-existent directory stack entry is specified, or the
directory change fails.
.RE
.TP
\fBprintf\fP \fIformat\fP [\fIarguments\fP]
\fBprintf\fP [\fB\-v\fP \fIvar\fP] \fIformat\fP [\fIarguments\fP]
Write the formatted \fIarguments\fP to the standard output under the
control of the \fIformat\fP.
The \fIformat\fP is a character string which contains three types of objects:
@@ -7306,6 +7308,9 @@ beginning with \fB\e0\fP may contain up to four digits),
and \fB%q\fP causes \fBprintf\fP to output the corresponding
\fIargument\fP in a format that can be reused as shell input.
.sp 1
The \fB\-v\fP option causes the output to be assigned to the variable
\fIvar\fP rather than being printed to the standard output.
.sp 1
The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP.
If the \fIformat\fP requires more \fIarguments\fP than are supplied, the
extra format specifications behave as if a zero value or null string, as
@@ -8117,6 +8122,12 @@ expansion (see
.B Pathname Expansion
above).
.TP 8
.B nocasematch
If set,
.B bash
matches patterns in a case\-insensitive fashion when performing matching
while executing \fBcase\fP or \fB[[\fP conditional commands.
.TP 8
.B nullglob
If set,
.B bash
@@ -8190,6 +8201,8 @@ Each operator and operand must be a separate argument.
Expressions are composed of the primaries described above under
.SM
.BR "CONDITIONAL EXPRESSIONS" .
\fBtest\fP does not accept any options, nor does it accept and ignore
an argument of \fB\-\-\fP as signifying the end of options.
.if t .sp 0.5
.if n .sp 1
Expressions may be combined using the following operators, listed
+6
View File
@@ -2642,6 +2642,8 @@ Many of the builtins have been extended by @sc{posix} or Bash.
Unless otherwise noted, each builtin command documented as accepting
options preceded by @samp{-} accepts @samp{--}
to signify the end of the options.
For example, the @code{:}, @code{true}, @code{false}, and @code{test}
builtins do not accept options.
@node Bourne Shell Builtins
@section Bourne Shell Builtins
@@ -2932,6 +2934,8 @@ Evaluate a conditional expression @var{expr}.
Each operator and operand must be a separate argument.
Expressions are composed of the primaries described below in
@ref{Bash Conditional Expressions}.
@code{test} does not accept any options, nor does it accept and ignore
an argument of @option{--} as signifying the end of options.
When the @code{[} form is used, the last argument to the command must
be a @code{]}.
@@ -3335,6 +3339,8 @@ even on systems where they are interpreted by default.
The @code{xpg_echo} shell option may be used to
dynamically determine whether or not @code{echo} expands these
escape characters by default.
@code{echo} does not interpret @option{--} to mean the end of options.
@code{echo} interprets the following escape sequences:
@table @code
@item \a
+14 -9
View File
@@ -3449,7 +3449,7 @@ parent.
@item printf
@btindex printf
@example
@code{printf} @var{format} [@var{arguments}]
@code{printf} [-v @var{var}] @var{format} [@var{arguments}]
@end example
Write the formatted @var{arguments} to the standard output under the
control of the @var{format}.
@@ -3467,6 +3467,9 @@ beginning with @samp{\0} may contain up to four digits),
and @samp{%q} causes @code{printf} to output the
corresponding @var{argument} in a format that can be reused as shell input.
The @option{-v} option causes the output to be assigned to the variable
@var{var} rather than being printed to the standard output.
The @var{format} is reused as necessary to consume all of the @var{arguments}.
If the @var{format} requires more @var{arguments} than are supplied, the
extra format specifications behave as if a zero value or null string, as
@@ -3746,6 +3749,11 @@ on an empty line.
If set, Bash matches filenames in a case-insensitive fashion when
performing filename expansion.
@item nocasematch
If set, Bash matches patterns in a case-insensitive fashion when
performing matching while executing @code{case} or @code{[[}
conditional commands.
@item nullglob
If set, Bash allows filename patterns which match no
files to expand to a null string, rather than themselves.
@@ -5627,6 +5635,8 @@ referencing element zero.
The @code{unset} builtin is used to destroy arrays.
@code{unset} @var{name}[@var{subscript}]
destroys the array element at index @var{subscript}.
Care must be taken to avoid unwanted side effects caused by filename
generation.
@code{unset} @var{name}, where @var{name} is an array, removes the
entire array. A subscript of @samp{*} or @samp{@@} also removes the
entire array.
@@ -5919,7 +5929,8 @@ is stopped is `Stopped(@var{signame})', where @var{signame} is, for
example, @code{SIGTSTP}.
@item
Reserved words may not be aliased.
Reserved words appearing in a context where reserved words are recognized
do not undergo alias expansion.
@item
The @sc{posix} 1003.2 @env{PS1} and @env{PS2} expansions of @samp{!} to
@@ -5980,12 +5991,6 @@ the POSIX.2 standard, and include things like passing incorrect options,
redirection errors, variable assignment errors for assignments preceding
the command name, and so on.
@item
If the @code{cd} builtin finds a directory to change to
using @env{$CDPATH}, the
value it assigns to the @env{PWD} variable does not contain any
symbolic links, as if @samp{cd -P} had been executed.
@item
If @env{CDPATH} is set, the @code{cd} builtin will not implicitly
append the current directory to it. This means that @code{cd} will
@@ -6067,7 +6072,7 @@ does not refer to an existing directory, @code{cd} will fail instead of
falling back to @var{physical} mode.
@item
When the @code{pwd} builtin is supplied the @opt{-P} option, it resets
When the @code{pwd} builtin is supplied the @option{-P} option, it resets
@code{$PWD} to a pathname containing no symlinks.
@item
+3 -4
View File
@@ -2,10 +2,9 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Wed Mar 23 20:57:44 EST 2005
@set LASTCHANGE Sat Apr 30 19:08:57 EDT 2005
@set EDITION 3.1-devel
@set VERSION 3.1-devel
@set UPDATED 23 March 2005
@set UPDATED-MONTH March 2005
@set UPDATED 30 April 2005
@set UPDATED-MONTH April 2005
+4 -3
View File
@@ -2,9 +2,10 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Feb 18 22:22:06 EST 2005
@set LASTCHANGE Wed Mar 23 20:57:44 EST 2005
@set EDITION 3.1-devel
@set VERSION 3.1-devel
@set UPDATED 18 February 2005
@set UPDATED-MONTH February 2005
@set UPDATED 23 March 2005
@set UPDATED-MONTH March 2005
+2
View File
@@ -90,6 +90,7 @@ rl_callback_handler_install (prompt, linefunc)
rl_vcpfunc_t *linefunc;
{
rl_set_prompt (prompt);
RL_SETSTATE (RL_STATE_CALLBACK);
rl_linefunc = linefunc;
_rl_callback_newline ();
}
@@ -145,6 +146,7 @@ void
rl_callback_handler_remove ()
{
rl_linefunc = NULL;
RL_UNSETSTATE (RL_STATE_CALLBACK);
if (in_handler)
{
in_handler = 0;
+1
View File
@@ -781,6 +781,7 @@ extern int rl_inhibit_completion;
#define RL_STATE_UNDOING 0x10000 /* doing an undo */
#define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */
#define RL_STATE_TTYCSAVED 0x40000 /* tty special chars saved */
#define RL_STATE_CALLBACK 0x80000 /* using the callback interface */
#define RL_STATE_DONE 0x80000 /* done; accepted line */