mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-25 06:47:56 +02:00
commit bash-20120817 snapshot
This commit is contained in:
@@ -14327,3 +14327,56 @@ lib/readline/readline.c
|
||||
- _rl_dispatch_subseq, _rl_subseq_result: don't call _rl_unget_char
|
||||
if we're currently reading from a macro; call _rl_prev_macro_key
|
||||
instead. Fixes bug reported by Clark Wang <clark.wang@oracle.com>
|
||||
|
||||
8/13
|
||||
----
|
||||
builtins/evalstring.c
|
||||
- evalstring(): new function, wrapper around parse_and_execute.
|
||||
make sure we handle cases where parse_and_execute can call `return'
|
||||
and short-circuit without cleaning up properly. We call
|
||||
parse_and_execute_cleanup() then jump to the previous-saved return
|
||||
location
|
||||
|
||||
builtins/common.h
|
||||
- extern declaration for evalstring()
|
||||
|
||||
builtins/eval.def
|
||||
- eval_builtin: make sure we handle `eval " ... return"' in contexts
|
||||
where `return' is valid by calling evalstring(). Fixes bug with
|
||||
`eval return' in sourced files reported by Clark Wang
|
||||
<dearvoid@gmail.com>
|
||||
|
||||
trap.c
|
||||
- run_pending_traps: call evalstring instead of parse_and_execute.
|
||||
XXX - still needs to handle saving and restoring token state in the
|
||||
presence of `return'; could use unwind_protects for that
|
||||
|
||||
builtins/mapfile.def
|
||||
- run_callback: call evalstring instead of parse_and_execute
|
||||
|
||||
8/15
|
||||
----
|
||||
bashline.c
|
||||
- bash_filename_stat_hook: make sure we don't free local_dirname
|
||||
before using it to canonicalize any expanded filename. Make sure
|
||||
it always points to *dirname and only free it if we're replacing
|
||||
it.
|
||||
|
||||
lib/readline/complete.c
|
||||
- append_to_match: make sure we call rl_filename_stat_hook with
|
||||
newly-allocated memory to avoid problems with freeing it twice
|
||||
|
||||
8/17
|
||||
----
|
||||
variables.c,config-top.h
|
||||
- if ARRAY_EXPORT is defined to 1 when variables.c is compiled, the
|
||||
code that allows indexed arrays to be exported is enabled and
|
||||
included
|
||||
|
||||
8/19
|
||||
----
|
||||
shell.c
|
||||
- call start_debugger from main() only if dollar_vars[1] != 0 (close
|
||||
enough to a non-interactive shell, since we can be interactive with
|
||||
-i while running a shell script). Fixes oddity reported by
|
||||
Techlive Zheng <techlivezheng@gmail.com>
|
||||
|
||||
+14374
File diff suppressed because it is too large
Load Diff
@@ -2802,6 +2802,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
|
||||
opt_bash_malloc=yes
|
||||
opt_purify=no
|
||||
opt_purecov=no
|
||||
|
||||
+53
-53
@@ -15,55 +15,55 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_NLS' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_AM_COND_ENDIF' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AM_SILENT_RULES' => 1,
|
||||
'AM_PROG_MOC' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'include' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'LT_INIT' => 1,
|
||||
'AM_PROG_AR' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AM_POT_TOOLS' => 1,
|
||||
@@ -84,55 +84,55 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_PATH_GUILE' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_NLS' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AM_MAKEFILE_INCLUDE' => 1,
|
||||
'AM_PROG_CXX_C_O' => 1,
|
||||
'_AM_COND_ENDIF' => 1,
|
||||
'_AM_MAKEFILE_INCLUDE' => 1,
|
||||
'_AM_COND_ENDIF' => 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,
|
||||
'include' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AM_PROG_AR' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_XGETTEXT_OPTION' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AM_POT_TOOLS' => 1,
|
||||
@@ -155,19 +155,19 @@
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
@@ -186,17 +186,17 @@
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
@@ -218,33 +218,33 @@
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
|
||||
+1651
-1650
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -2978,12 +2978,12 @@ bash_filename_stat_hook (dirname)
|
||||
behaves unpredictably when passed null or empty strings */
|
||||
if (new_dirname && *new_dirname)
|
||||
{
|
||||
*dirname = new_dirname;
|
||||
free (local_dirname); /* XXX */
|
||||
local_dirname = *dirname = new_dirname;
|
||||
return_value = STREQ (local_dirname, *dirname) == 0;
|
||||
}
|
||||
else
|
||||
free (new_dirname);
|
||||
free (local_dirname);
|
||||
dispose_words (wl);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -163,6 +163,7 @@ extern WORD_LIST *get_directory_stack __P((int));
|
||||
|
||||
/* Functions from evalstring.c */
|
||||
extern int parse_and_execute __P((char *, const char *, int));
|
||||
extern int evalstring __P((char *, const char *, int));
|
||||
extern void parse_and_execute_cleanup __P((void));
|
||||
extern int parse_string __P((char *, const char *, int, char **));
|
||||
|
||||
|
||||
+1
-2
@@ -53,6 +53,5 @@ eval_builtin (list)
|
||||
return (EX_USAGE);
|
||||
list = loptend; /* skip over possible `--' */
|
||||
|
||||
/* Note that parse_and_execute () frees the string it is passed. */
|
||||
return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
|
||||
return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ extern int loop_level;
|
||||
extern int executing_list;
|
||||
extern int comsub_ignore_return;
|
||||
extern int posixly_correct;
|
||||
extern int return_catch_flag, return_catch_value;
|
||||
extern sh_builtin_func_t *this_shell_builtin;
|
||||
extern char *the_printed_command_except_trap;
|
||||
|
||||
@@ -522,3 +523,49 @@ cat_file (r)
|
||||
|
||||
return (rval);
|
||||
}
|
||||
|
||||
int
|
||||
evalstring (string, from_file, flags)
|
||||
char *string;
|
||||
const char *from_file;
|
||||
int flags;
|
||||
{
|
||||
volatile int r, rflag, rcatch;
|
||||
|
||||
rcatch = 0;
|
||||
rflag = return_catch_flag;
|
||||
/* If we are in a place where `return' is valid, we have to catch
|
||||
`eval "... return"' and make sure parse_and_execute cleans up. Then
|
||||
we can trampoline to the previous saved return_catch location. */
|
||||
if (rflag)
|
||||
{
|
||||
begin_unwind_frame ("evalstring");
|
||||
|
||||
unwind_protect_int (return_catch_flag);
|
||||
unwind_protect_jmp_buf (return_catch);
|
||||
|
||||
return_catch_flag++; /* increment so we have a counter */
|
||||
rcatch = setjmp (return_catch);
|
||||
}
|
||||
|
||||
if (rcatch)
|
||||
{
|
||||
parse_and_execute_cleanup ();
|
||||
r = return_catch_value;
|
||||
}
|
||||
else
|
||||
/* Note that parse_and_execute () frees the string it is passed. */
|
||||
r = parse_and_execute (string, from_file, flags);
|
||||
|
||||
if (rflag)
|
||||
{
|
||||
run_unwind_frame ("evalstring");
|
||||
if (rcatch && return_catch_flag)
|
||||
{
|
||||
return_catch_value = r;
|
||||
longjmp (return_catch, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return (r);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ run_callback (callback, curindex, curline)
|
||||
#endif
|
||||
snprintf (execstr, execlen, "%s %d %s", callback, curindex, qline);
|
||||
free (qline);
|
||||
return parse_and_execute (execstr, NULL, flags);
|
||||
return evalstring (execstr, NULL, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -128,3 +128,7 @@
|
||||
using indexed arrays, 0 if you want bash-4.2 behavior, which favors
|
||||
random access but is O(N) for each array assignment. */
|
||||
#define OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT 1
|
||||
|
||||
/* Define to 1 if you want to be able to export indexed arrays to processes
|
||||
using the foo=([0]=one [1]=two) and so on */
|
||||
/* #define ARRAY_EXPORT 1 */
|
||||
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/* config-top.h - various user-settable options not under the control of autoconf. */
|
||||
|
||||
/* Copyright (C) 2002-2009 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 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' terminates due to a SIGPIPE. */
|
||||
#define DONT_REPORT_SIGPIPE
|
||||
|
||||
/* Define DONT_REPORT_SIGTERM if you don't want to see `Terminates' message
|
||||
when a job exits due to SIGTERM, since that's the default signal sent
|
||||
by the kill builtin. */
|
||||
/* #define DONT_REPORT_SIGTERM */
|
||||
|
||||
/* Define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS if you don't want builtins
|
||||
like `echo' and `printf' to report errors when output does not succeed
|
||||
due to EPIPE. */
|
||||
/* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */
|
||||
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
"/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:."
|
||||
#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). This checks
|
||||
for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
|
||||
which can be fooled under certain not-uncommon circumstances. */
|
||||
/* #define SSH_SOURCE_BASHRC */
|
||||
|
||||
/* Define if you want the case-capitalizing operators (~[~]) and the
|
||||
`capcase' variable attribute (declare -c). */
|
||||
#define CASEMOD_CAPCASE
|
||||
|
||||
/* This is used as the name of a shell function to call when a command
|
||||
name is not found. If you want to name it something other than the
|
||||
default ("command_not_found_handle"), change it here. */
|
||||
/* #define NOTFOUND_HOOK "command_not_found_handle" */
|
||||
|
||||
/* Define if you want each line saved to the history list in bashhist.c:
|
||||
bash_add_history() to be sent to syslog(). */
|
||||
/* #define SYSLOG_HISTORY */
|
||||
#if defined (SYSLOG_HISTORY)
|
||||
# define SYSLOG_FACILITY LOG_USER
|
||||
# define SYSLOG_LEVEL LOG_INFO
|
||||
#endif
|
||||
|
||||
/* Define if you want to include code in shell.c to support wordexp(3) */
|
||||
/* #define WORDEXP_OPTION */
|
||||
|
||||
/* Define as 1 if you want to enable code that implements multiple coprocs */
|
||||
#ifndef MULTIPLE_COPROCS
|
||||
# define MULTIPLE_COPROCS 0
|
||||
#endif
|
||||
|
||||
/* Define to 0 if you want the checkwinsize option off by default, 1 if you
|
||||
want it on. */
|
||||
#define CHECKWINSIZE_DEFAULT 0
|
||||
|
||||
/* Define to 1 if you want to optimize for sequential array assignment when
|
||||
using indexed arrays, 0 if you want bash-4.2 behavior, which favors
|
||||
random access but is O(N) for each array assignment. */
|
||||
#define OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT 1
|
||||
@@ -2802,6 +2802,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
|
||||
opt_bash_malloc=yes
|
||||
opt_purify=no
|
||||
opt_purecov=no
|
||||
|
||||
@@ -1791,7 +1791,7 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
|
||||
char *text;
|
||||
int delimiter, quote_char, nontrivial_match;
|
||||
{
|
||||
char temp_string[4], *filename;
|
||||
char temp_string[4], *filename, *fn;
|
||||
int temp_string_index, s;
|
||||
struct stat finfo;
|
||||
|
||||
@@ -1811,7 +1811,12 @@ append_to_match (text, delimiter, quote_char, nontrivial_match)
|
||||
{
|
||||
filename = tilde_expand (text);
|
||||
if (rl_filename_stat_hook)
|
||||
(*rl_filename_stat_hook) (&filename);
|
||||
{
|
||||
fn = savestring (filename);
|
||||
(*rl_filename_stat_hook) (&fn);
|
||||
xfree (filename);
|
||||
filename = fn;
|
||||
}
|
||||
s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0)
|
||||
? LSTAT (filename, &finfo)
|
||||
: stat (filename, &finfo);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* shell.c -- GNU's idea of the POSIX shell specification. */
|
||||
|
||||
/* Copyright (C) 1987-2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -718,7 +718,7 @@ main (argc, argv, env)
|
||||
/* Bind remaining args to $1 ... $n */
|
||||
arg_index = bind_args (argv, arg_index, argc, 1);
|
||||
|
||||
if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0)
|
||||
if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && dollar_vars[1])
|
||||
start_debugger ();
|
||||
|
||||
/* Do the things that should be done only for interactive shells. */
|
||||
|
||||
@@ -340,7 +340,7 @@ run_pending_traps ()
|
||||
save_subst_varlist = subst_assign_varlist;
|
||||
subst_assign_varlist = 0;
|
||||
|
||||
parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
|
||||
evalstring (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
|
||||
restore_token_state (token_state);
|
||||
free (token_state);
|
||||
|
||||
|
||||
+4
-4
@@ -375,7 +375,7 @@ initialize_shell_variables (env, privmode)
|
||||
name[char_index - 2] = '('; /* ) */
|
||||
}
|
||||
#if defined (ARRAY_VARS)
|
||||
# if 0
|
||||
# if ARRAY_EXPORT
|
||||
/* Array variables may not yet be exported. */
|
||||
else if (*string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
|
||||
{
|
||||
@@ -386,7 +386,7 @@ initialize_shell_variables (env, privmode)
|
||||
VSETATTR (temp_var, (att_exported | att_imported));
|
||||
array_needs_making = 1;
|
||||
}
|
||||
# endif
|
||||
# endif /* ARRAY_EXPORT */
|
||||
#endif
|
||||
#if 0
|
||||
else if (legal_identifier (name))
|
||||
@@ -3803,11 +3803,11 @@ make_env_array_from_var_list (vars)
|
||||
value = named_function_string ((char *)NULL, function_cell (var), 0);
|
||||
#if defined (ARRAY_VARS)
|
||||
else if (array_p (var))
|
||||
# if 0
|
||||
# if ARRAY_EXPORT
|
||||
value = array_to_assignment_string (array_cell (var));
|
||||
# else
|
||||
continue; /* XXX array vars cannot yet be exported */
|
||||
# endif
|
||||
# endif /* ARRAY_EXPORT */
|
||||
else if (assoc_p (var))
|
||||
# if 0
|
||||
value = assoc_to_assignment_string (assoc_cell (var));
|
||||
|
||||
+5150
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user