commit bash-20190719 snapshot

This commit is contained in:
Chet Ramey
2019-07-22 09:24:14 -04:00
parent e2169ae94e
commit 194cfc28f8
26 changed files with 7379 additions and 890 deletions
+96 -1
View File
@@ -6251,7 +6251,8 @@ lib/sh/strtod.c
----
lib/sh/utf8.c
- utf8_mblen: return -2 if the UTF-8 sequence is incomplete
- utf8_mblen: 4-byte UTF-8 characters start with a byte < 0xf4
- utf8_mblen: 4-byte UTF-8 characters start with a byte <= 0xf4; limit
to 4-byte UTF-8 (since 5- and 6-byte code points were removed in 2003)
7/12
----
@@ -6280,3 +6281,97 @@ lib/readline/display.c
local_prompt_newlines, and we want the values computed in the call
that uses local_prompt to be the ones that we use. Fixes prompt
wrapping bug reported by Tianon Gravi <admwiggin@gmail.com>
7/16
----
Makefile.in
- added a number of dependencies from Vemake Vemake
<vemakereporter@gmail.com> as reported in
http://savannah.gnu.org/patch/download.php?file_id=47219
7/19
----
lib/sh/utf8.c
- utf8_mblen: changes to handle invalid multibyte sequences better,
even when N means that the sequence would be too short anyway
arrayfunc.c
- bind_assoc_var_internal: new convenience function to assign a
key-value pair to an associative array. It gets the SHELL_VAR * AND
a HASH_TABLE *, which may or may not correspond to the assoc_cell
of the variable, and performs the insertion into the hash table.
Callers take care of passing the right values.
- bind_assoc_variable: call bind_assoc_var_internal to do the real
work
- assign_compound_array_list: change to assign associative array
key-value pairs into a new hash table (NHASH), so we can still use
the old value for expansion. We do this in place of clearing out
the contents of the associative array before performing the expansion
and assignments. After doing all the assignments into NHASH, we swap
NHASH into the variable as its value and dispose of the old value.
Fixes inconsistency reported by Darren 'Tadgy' Austin
<darren@afterdark.org.uk>
7/20
----
aclocal.m4
- include bashansi.h in a bunch of AC_TRY_RUN recipies to avoid
exit() being flagged as an implicit declaration. Report and fix
from Chris Yungmann <yungmann.chris@gmail.com>
shell.c
- set_exit_status: set last_command_exit_value to the argument and make
sure to set PIPESTATUS from that exit value
shell.h
- set_exit_status: extern declaration
parse.y
- report_syntax_error: make sure to set PIPESTATUS if we set
last_command_exit_value on a syntax error
- parse_string_to_word_list,parse_compound_assignment: set PIPESTATUS
when we set last_command_exit_value
sig.c
- throw_to_top_level,sigint_sighandler: set PIPESTATUS when we set
last_command_exit_value
variables.c
- sv_locale: call set_exit_status to set PIPESTATUS and last_command_exit_value
arrayfunc.c
- find_or_make_array_variable,array_expand_index,assign_compound_array_list:
call set_exit_status to set PIPESTATUS and last_command_exit_value
builtins/evalstring.c
- parse_and_execute: set PIPESTATUS when we set last_command_exit_value
braces.c
- brace_expand: call set_exit_status to set PIPESTATUS and last_command_exit_value
eval.c
- reader_loop: call set_exit_status to set PIPESTATUS and last_command_exit_value
make_cmd.c
- set PIPESTATUS when setting $? due to syntax errors or constructs
not being available
expr.c
- expr_streval: set PIPESTATUS when setting $? due to syntax errors
subst.c
- extract_delimited_string,extract_dollar_brace_string,do_assignment_internal,
call_expand_word_internal,array_length_reference,param_expand,
parameter_brace_expand_word,parameter_brace_expand_rhs,
parameter_brace_expand_error,parameter_brace_expand,err_unboundvar:
set PIPESTATUS when setting last_command_exit_value on error
conditions
redir.c
- REDIRECTION_ERROR: set PIPESTATUS when setting last_command_exit_value
on error conditions
subst.c
- match_upattern,match_wpattern: if the match length is greater than the
string length, short-circuit and return failure. Fixes bug
reported by Eduardo Bustamante <dualbus@gmail.com>
-1
View File
@@ -1 +0,0 @@
CWRU.chlog
+6357
View File
File diff suppressed because it is too large Load Diff
+101 -30
View File
@@ -1,4 +1,4 @@
# Makefile for bash-5.0, version 4.28
# Makefile for bash-5.0, version 4.29
#
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
@@ -592,7 +592,7 @@ $(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
@echo " ***********************************************************"
@echo
bashbug: $(SDIR)/bashbug.sh config.h Makefile $(VERSPROG)
bashbug: $(SDIR)/bashbug.sh $(VERSPROG)
@sed -e "s%!PATCHLEVEL!%$(PatchLevel)%" \
$(SDIR)/bashbug.sh > $@
@chmod a+rx bashbug
@@ -628,12 +628,15 @@ version.h: $(SOURCES) config.h Makefile patchlevel.h
$(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \
&& mv newversion.h version.h
bashversion$(EXEEXT): patchlevel.h conftypes.h version.h buildversion.o $(SUPPORT_SRC)bashversion.c
bashversion$(EXEEXT): buildversion.o $(SUPPORT_SRC)bashversion.c
$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o ${LIBS_FOR_BUILD}
buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c
buildversion.o: $(srcdir)/version.c
$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c
buildversion.o: bashintl.h $(BASHINCDIR)/gettext.h
buildversion.o: version.h patchlevel.h conftypes.h
# old rules
GRAM_H = parser-built
y.tab.o: y.tab.h y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h
@@ -711,7 +714,7 @@ mksignames$(EXEEXT): mksignames.o buildsignames.o
$(RM) $@
$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD}
mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h
mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h bashansi.h
$(RM) $@
${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD}
@@ -977,35 +980,44 @@ hashtest: hashlib.c
# Files that depend on the definitions in config-top.h, which are not meant
# to be changed
bashhist.o: config-top.h
shell.o: config-top.h
input.o: config-top.h
y.tab.o: config-top.h
jobs.o: config-top.h
nojobs.o: config-top.h
execute_cmd.o: config-top.h
variables.o: config-top.h
subst.o: config-top.h
builtins/command.o: config-top.h
builtins/common.o: config-top.h
builtins/declare.o: config-top.h
builtins/break.o: config-top.h
builtins/echo.o: config-top.h
builtins/evalstring.o: config-top.h
builtins/exit.o: config-top.h
builtins/kill.o: config-top.h
array.o: $(srcdir)/config-top.h
bashhist.o: $(srcdir)/config-top.h
shell.o: $(srcdir)/config-top.h
input.o: $(srcdir)/config-top.h
y.tab.o: $(srcdir)/config-top.h
jobs.o: $(srcdir)/config-top.h
nojobs.o: $(srcdir)/config-top.h
execute_cmd.o: $(srcdir)/config-top.h
variables.o: $(srcdir)/config-top.h
findcmd.o: $(srcdir)/config-top.h
subst.o: $(srcdir)/config-top.h
builtins/cd.o: $(srcdir)/config-top.h
builtins/command.o: $(srcdir)/config-top.h
builtins/common.o: $(srcdir)/config-top.h
builtins/declare.o: $(srcdir)/config-top.h
builtins/break.o: $(srcdir)/config-top.h
builtins/echo.o: $(srcdir)/config-top.h
builtins/evalstring.o: $(srcdir)/config-top.h
builtins/exit.o: $(srcdir)/config-top.h
builtins/kill.o: $(srcdir)/config-top.h
builtins/shopt.o: $(srcdir)/config-top.h
# XXX
${SH_LIBDIR}/tmpfile.o: $(srcdir)/config-top.h
# shell basics
copy_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
copy_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
copy_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
copy_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
copy_cmd.o: bashansi.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
dispose_cmd.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
dispose_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h
dispose_cmd.o: error.h general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
dispose_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
dispose_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
dispose_cmd.o: ${BASHINCDIR}/ocache.h
dispose_cmd.o: assoc.h ${BASHINCDIR}/chartypes.h
error.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h flags.h ${BASHINCDIR}/stdc.h error.h
error.o: command.h general.h xmalloc.h externs.h input.h bashhist.h
error.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1013,12 +1025,14 @@ error.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h arr
error.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
error.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h
error.o: input.h execute_cmd.h
error.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h assoc.h
eval.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.h flags.h ${DEFSRC}/common.h
eval.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
eval.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
eval.o: input.h execute_cmd.h
eval.o: bashhist.h assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1029,12 +1043,15 @@ execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h
execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h ${GLOB_LIBSRC}/strmatch.h
execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h
execute_cmd.o: $(DEFSRC)/getopt.h
execute_cmd.o: bashhist.h input.h ${GRAM_H} assoc.h hashcmd.h alias.h
execute_cmd.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/posixwait.h
expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
expr.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
expr.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h execute_cmd.h
expr.o: ${BASHINCDIR}/chartypes.h
expr.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/typemax.h
findcmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h
findcmd.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h
findcmd.o: ${BASHINCDIR}/stdc.h error.h general.h xmalloc.h variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h
@@ -1046,6 +1063,7 @@ flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h
flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
flags.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h execute_cmd.h
flags.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.h
flags.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h
general.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
general.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1054,6 +1072,8 @@ general.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h parser.h
general.o: pathexp.h
general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h
general.o: ${BASHINCDIR}/chartypes.h
general.o: trap.h input.h assoc.h test.h findcmd.h
general.o: ${BASHINCDIR}/ocache.h $(DEFSRC)/common.h
hashcmd.o: config.h ${BASHINCDIR}/posixstat.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
hashcmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
hashcmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashcmd.h
@@ -1064,6 +1084,7 @@ hashlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.
hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h
hashlib.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h
input.o: quit.h shell.h pathnames.h
@@ -1071,12 +1092,14 @@ list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h $
list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
list.o: make_cmd.h subst.h sig.h pathnames.h externs.h
locale.o: config.h bashtypes.h bashintl.h ${LIBINTL_H} bashansi.h ${BASHINCDIR}/ansi_stdlib.h
list.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h
locale.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h
locale.o: ${BASHINCDIR}/chartypes.h
locale.o: input.h assoc.h ${BASHINCDIR}/ocache.h
mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
mailcheck.o: ${BASHINCDIR}/posixtime.h
mailcheck.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1084,12 +1107,15 @@ mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h
mailcheck.o: execute_cmd.h mailcheck.h
mailcheck.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h
make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h
make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h
make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h
make_cmd.o: jobs.h quit.h sig.h siglist.h syntax.h dispose_cmd.h parser.h
make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/ocache.h
make_cmd.o: shell.h execute_cmd.h pathnames.h
make_cmd.o: $(BASHINCDIR)/maxpath.h make_cmd.c assoc.h $(BASHINCDIR)/chartypes.h
make_cmd.o: unwind_prot.h $(BASHINCDIR)/posixjmp.h bashjmp.h $(BASHINCDIR)/posixwait.h
y.tab.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h
y.tab.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
y.tab.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1097,6 +1123,8 @@ y.tab.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
y.tab.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h execute_cmd.o
y.tab.o: trap.h flags.h parser.h input.h mailcheck.h $(DEFSRC)/common.h
y.tab.o: $(DEFDIR)/builtext.h bashline.h bashhist.h jobs.h siglist.h alias.h
y.tab.o: ${BASHINCDIR}/typemax.h assoc.h ${BASHINCDIR}/ocache.h
y.tab.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/posixwait.h
pathexp.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
pathexp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
pathexp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1105,6 +1133,7 @@ pathexp.o: make_cmd.h subst.h sig.h pathnames.h externs.h
pathexp.o: pathexp.h flags.h
pathexp.o: $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h
pathexp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
pathexp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h
print_cmd.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
print_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1112,12 +1141,15 @@ print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
print_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h
print_cmd.o: flags.h input.h assoc.h
print_cmd.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h
redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
redir.o: flags.h execute_cmd.h redir.h input.h
redir.o: ${DEFDIR}/pipesize.h
redir.o: trap.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
shell.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1125,7 +1157,8 @@ shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h
shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h bashline.h
shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h
shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/posixwait.h
shell.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h alias.h
sig.o: config.h bashtypes.h
sig.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1139,6 +1172,7 @@ stringlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h comman
stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h
stringlib.o: bashansi.h pathexp.h assoc.h $(BASHINCDIR)/ocache.h
stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h
subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h
subst.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1156,6 +1190,8 @@ test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h $
test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h
test.o: ${BASHINCDIR}/stat-time.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
test.o: $(GLOB_LIBSRC)/strmatch.h bashansi.h pathexp.h assoc.h
test.o: ${DEFSRC}/common.h
trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1166,6 +1202,7 @@ trap.o: signames.h $(DEFSRC)/common.h
trap.o: ${DEFDIR}/builtext.h jobs.h
unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h
unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h
unwind_prot.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h error.h
variables.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
variables.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
@@ -1174,15 +1211,16 @@ variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h
variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h
variables.o: pcomplete.h ${BASHINCDIR}/chartypes.h
variables.o: ${BASHINCDIR}/posixtime.h assoc.h
variables.o: ${BASHINCDIR}/posixtime.h assoc.h ${DEFSRC}/getopt.h
variables.o: version.h $(DEFDIR)/builtext.h
version.o: conftypes.h patchlevel.h version.h
version.o: conftypes.h patchlevel.h version.h
xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h
xmalloc.o: ${BASHINCDIR}/stdc.h $(ALLOC_LIBSRC)/shmalloc.h
# job control
jobs.o: config.h bashtypes.h trap.h ${BASHINCDIR}/filecntl.h input.h ${BASHINCDIR}/shtty.h
jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h assoc.h
jobs.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.h
@@ -1190,10 +1228,12 @@ jobs.o: execute_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h
jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h
jobs.o: ${BASHINCDIR}/posixtime.h
jobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h
nojobs.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashjmp.h ${BASHINCDIR}/posixjmp.h
nojobs.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h jobs.h quit.h siglist.h externs.h
nojobs.o: sig.h error.h ${BASHINCDIR}/shtty.h input.h parser.h
nojobs.o: $(DEFDIR)/builtext.h
nojobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h
# shell features that may be compiled in
@@ -1202,6 +1242,7 @@ array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h
array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
array.o: make_cmd.h subst.h sig.h pathnames.h externs.h
array.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
array.o: $(DEFSRC)/common.h
arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
arrayfunc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1209,6 +1250,7 @@ arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h pathexp.h
arrayfunc.o: execute_cmd.h
arrayfunc.o: assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
arrayfunc.o: $(DEFSRC)/common.h
arrayfunc.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
assoc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
@@ -1218,6 +1260,7 @@ assoc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
assoc.o: assoc.h hashlib.h
assoc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
assoc.o: make_cmd.h subst.h sig.h pathnames.h externs.h
assoc.o: array.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
assoc.o: $(DEFSRC)/common.h
braces.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
braces.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
@@ -1225,16 +1268,18 @@ braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h ar
braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h
braces.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
braces.o: ${BASHINCDIR}/typemax.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h
alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h
alias.o: pcomplete.h
alias.o: pcomplete.h hashlib.h
alias.o: ${BASHINCDIR}/chartypes.h
pcomplib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
pcomplib.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
pcomplib.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h
pcomplib.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h
pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h
pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h assoc.h array.h
pcomplib.o: ${BASHINCDIR}/posixjmp.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
pcomplete.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
pcomplete.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
@@ -1253,13 +1298,15 @@ bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h
bashhist.o: $(GLOB_LIBSRC)/strmatch.h
bashhist.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h
bashhist.o: $(GLOB_LIBSRC)/strmatch.h ${GLOB_LIBSRC}/glob.h
bashline.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
bashline.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h
bashline.o: trap.h flags.h assoc.h $(BASHINCDIR)/ocache.h
bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h
bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
@@ -1270,32 +1317,51 @@ bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
bracecomp.o: array.h hashlib.h alias.h builtins.h
bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h
bracecomp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h
bracecomp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
# library dependencies
bashhist.o: $(RL_LIBSRC)/rltypedefs.h
bashline.o: $(RL_LIBSRC)/rlconf.h
bashline.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h
bashline.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h
bashline.o: $(RL_LIBSRC)/rltypedefs.h ${RL_LIBSRC}/rlmbutil.h
bracecomp.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
bracecomp.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
bracecomp.o: $(RL_LIBSRC)/rltypedefs.h
y.tab.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
y.tab.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
y.tab.o: $(RL_LIBSRC)/rltypedefs.h
subst.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
subst.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
shell.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
shell.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
shell.o: $(RL_LIBSRC)/rltypedefs.h
variables.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
variables.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
variables.o: $(RL_LIBSRC)/rltypedefs.h
jobs.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
jobs.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
jobs.o: $(RL_LIBSRC)/rltypedefs.h
shell.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
variables.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
subst.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
bashline.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
bashhist.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
y.tab.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
bashline.o: $(TILDE_LIBSRC)/tilde.h
bracecomp.o: $(TILDE_LIBSRC)/tilde.h
execute_cmd.o: $(TILDE_LIBSRC)/tilde.h
general.o: $(TILDE_LIBSRC)/tilde.h
mailcheck.o: $(TILDE_LIBSRC)/tilde.h
shell.o: $(TILDE_LIBSRC)/tilde.h
subst.o: $(TILDE_LIBSRC)/tilde.h
variables.o: $(TILDE_LIBSRC)/tilde.h
jobs.o: $(TILDE_LIBSRC)/tilde.h
y.tab.o: $(TILDE_LIBSRC)/tilde.h
# libintl dependencies
arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
@@ -1309,6 +1375,7 @@ expr.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
general.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
input.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
jobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
locale.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
@@ -1328,6 +1395,9 @@ variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
# XXX
$(MALLOC_SOURCE): bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
# XXX - dependencies checked through here
@@ -1367,6 +1437,7 @@ builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h
builtins/getopt.o: $(DEFSRC)/getopt.h
builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
builtins/mkbuiltins.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
builtins/mkbuiltins.o: $(BASHINCDIR)/stdc.h
# builtin def files
builtins/alias.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
Vendored
+17
View File
@@ -10,6 +10,7 @@ AC_DEFUN(BASH_C_LONG_LONG,
ac_cv_c_long_long=yes
else
AC_TRY_RUN([
#include "bashansi.h"
int
main()
{
@@ -33,6 +34,7 @@ AC_DEFUN(BASH_C_LONG_DOUBLE,
ac_cv_c_long_double=yes
else
AC_TRY_RUN([
#include "bashansi.h"
int
main()
{
@@ -136,6 +138,7 @@ typedef int (*_bashfunc)(const char *, ...);
#else
typedef int (*_bashfunc)();
#endif
#include "bashansi.h"
main()
{
_bashfunc pf;
@@ -193,6 +196,7 @@ AC_CACHE_VAL(bash_cv_under_sys_siglist,
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
#ifndef UNDER_SYS_SIGLIST_DECLARED
extern char *_sys_siglist[];
#endif
@@ -220,6 +224,7 @@ AC_CACHE_VAL(bash_cv_sys_siglist,
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
#if !HAVE_DECL_SYS_SIGLIST
extern char *sys_siglist[];
#endif
@@ -275,6 +280,7 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
[AC_TRY_RUN([
#include <sys/types.h>
#include <fcntl.h>
#include "bashansi.h"
main()
{
int fd1, fd2, fl;
@@ -337,6 +343,7 @@ AC_CACHE_VAL(bash_cv_opendir_not_robust,
# include <ndir.h>
# endif
#endif /* HAVE_DIRENT_H */
#include "bashansi.h"
main()
{
DIR *dir;
@@ -516,6 +523,7 @@ AC_TRY_RUN([
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "bashansi.h"
main()
{
#ifdef HAVE_QUAD_T
@@ -585,6 +593,7 @@ AC_CACHE_VAL(bash_cv_getenv_redef,
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bashansi.h"
#ifndef __STDC__
# ifndef const
# define const
@@ -788,6 +797,7 @@ AC_CACHE_VAL(bash_cv_func_sigsetjmp,
#include <sys/types.h>
#include <signal.h>
#include <setjmp.h>
#include "bashansi.h"
main()
{
@@ -883,6 +893,7 @@ AC_CACHE_VAL(bash_cv_printf_a_format,
[AC_TRY_RUN([
#include <stdio.h>
#include <string.h>
#include "bashansi.h"
int
main()
@@ -1243,6 +1254,7 @@ AC_CACHE_VAL(bash_cv_pgrp_pipe,
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bashansi.h"
main()
{
# ifdef GETPGRP_VOID
@@ -1307,6 +1319,7 @@ AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
typedef RETSIGTYPE sigfunc();
@@ -1420,6 +1433,7 @@ AC_CACHE_VAL(bash_cv_sys_named_pipes,
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
/* Add more tests in here as appropriate. */
main()
@@ -1653,6 +1667,7 @@ AC_CACHE_VAL(bash_cv_unusable_rtsigs,
[AC_TRY_RUN([
#include <sys/types.h>
#include <signal.h>
#include "bashansi.h"
#ifndef NSIG
# define NSIG 64
@@ -1836,6 +1851,7 @@ AC_CACHE_VAL(ac_cv_rl_version,
[AC_TRY_RUN([
#include <stdio.h>
#include <readline/readline.h>
#include "bashansi.h"
extern int rl_gnu_readline_p;
@@ -2040,6 +2056,7 @@ AC_DEFUN([BASH_FUNC_SNPRINTF],
AC_CACHE_CHECK([for standard-conformant snprintf], [bash_cv_func_snprintf],
[AC_TRY_RUN([
#include <stdio.h>
#include "bashansi.h"
main()
{
+63 -22
View File
@@ -177,7 +177,41 @@ make_array_variable_value (entry, ind, key, value, flags)
return newval;
}
/* Assign HASH[KEY]=VALUE according to FLAGS. ENTRY is an associative array
variable; HASH is the hash table to assign into. HASH may or may not be
the hash table associated with ENTRY; if it's not, the caller takes care
of it.
XXX - make sure that any dynamic associative array variables recreate the
hash table on each assignment. BASH_CMDS and BASH_ALIASES already do this */
static SHELL_VAR *
bind_assoc_var_internal (entry, hash, key, value, flags)
SHELL_VAR *entry;
HASH_TABLE *hash;
char *key;
char *value;
int flags;
{
char *newval;
/* Use the existing array contents to expand the value */
newval = make_array_variable_value (entry, 0, key, value, flags);
if (entry->assign_func)
(*entry->assign_func) (entry, newval, 0, key);
else
assoc_insert (hash, key, newval);
FREE (newval);
VUNSETATTR (entry, att_invisible); /* no longer invisible */
/* check mark_modified_variables if we ever want to export array vars */
return (entry);
}
/* Perform ENTRY[IND]=VALUE or ENTRY[KEY]=VALUE. This is not called for every
assignment to an associative array; see assign_compound_array_list below. */
static SHELL_VAR *
bind_array_var_internal (entry, ind, key, value, flags)
SHELL_VAR *entry;
@@ -271,7 +305,7 @@ bind_assoc_variable (entry, name, key, value, flags)
return (entry);
}
return (bind_array_var_internal (entry, 0, key, value, flags));
return (bind_assoc_var_internal (entry, assoc_cell (entry), key, value, flags));
}
/* Parse NAME, a lhs of an assignment statement of the form v[s], and
@@ -398,7 +432,7 @@ find_or_make_array_variable (name, flags)
}
else if ((flags & 2) && array_p (var))
{
last_command_exit_value = 1;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: cannot convert indexed to associative array"), name);
return ((SHELL_VAR *)NULL);
}
@@ -481,6 +515,9 @@ expand_compound_array_assignment (var, value, flags)
(ksh93 seems to do this). */
list = parse_string_to_word_list (val, 1, "array assign");
/* Note that we defer expansion of the assignment statements for associative
arrays here, so we don't have to scan the subscript and find the ending
bracket twice. See the caller below. */
if (var && assoc_p (var))
{
if (val != value)
@@ -507,7 +544,12 @@ expand_compound_array_assignment (var, value, flags)
return nlist;
}
/* Callers ensure that VAR is not NULL */
/* Callers ensure that VAR is not NULL. Associative array assignments have not
been expanded when this is called, so we don't have to scan through the
expanded subscript to find the ending bracket; indexed array assignments
have been expanded.
If this is an associative array, we perform the assignments into NHASH and
set NHASH to be the value of VAR after processing the assignments in NLIST */
void
assign_compound_array_list (var, nlist, flags)
SHELL_VAR *var;
@@ -515,7 +557,7 @@ assign_compound_array_list (var, nlist, flags)
int flags;
{
ARRAY *a;
HASH_TABLE *h;
HASH_TABLE *h, *nhash;
WORD_LIST *list;
char *w, *val, *nval, *savecmd;
int len, iflags, free_val;
@@ -523,7 +565,7 @@ assign_compound_array_list (var, nlist, flags)
char *akey;
a = (var && array_p (var)) ? array_cell (var) : (ARRAY *)0;
h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0;
nhash = h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0;
akey = (char *)0;
ind = 0;
@@ -535,7 +577,7 @@ assign_compound_array_list (var, nlist, flags)
if (a && array_p (var))
array_flush (a);
else if (h && assoc_p (var))
assoc_flush (h);
nhash = assoc_create (h->nbuckets);
}
last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0;
@@ -581,7 +623,7 @@ assign_compound_array_list (var, nlist, flags)
if (ALL_ELEMENT_SUB (w[1]) && len == 2)
{
last_command_exit_value = 1;
set_exit_status (EXECUTION_FAILURE);
if (assoc_p (var))
report_error (_("%s: invalid associative array key"), w);
else
@@ -629,7 +671,7 @@ assign_compound_array_list (var, nlist, flags)
}
else if (assoc_p (var))
{
last_command_exit_value = 1;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: %s: must use subscript when assigning associative array"), var->name, w);
continue;
}
@@ -655,13 +697,23 @@ assign_compound_array_list (var, nlist, flags)
savecmd = this_command_name;
if (integer_p (var))
this_command_name = (char *)NULL; /* no command name for errors */
bind_array_var_internal (var, ind, akey, val, iflags);
if (assoc_p (var))
bind_assoc_var_internal (var, nhash, akey, val, iflags);
else
bind_array_var_internal (var, ind, akey, val, iflags);
last_ind++;
this_command_name = savecmd;
if (free_val)
free (val);
}
if (assoc_p (var) && nhash && nhash != h)
{
h = assoc_cell (var);
var_setassoc (var, nhash);
assoc_dispose (h);
}
}
/* Perform a compound array assignment: VAR->name=( VALUE ). The
@@ -970,7 +1022,7 @@ array_expand_index (var, s, len, flags)
free (exp);
if (expok == 0)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
if (no_longjmp_on_fatal_error)
return 0;
@@ -1251,18 +1303,7 @@ array_keys (s, quoted, pflags)
if (l == (WORD_LIST *)NULL)
return ((char *) NULL);
#if 1
retval = string_list_pos_params (t[0], l, quoted, pflags);
#else
if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
{
temp = string_list_dollar_star (l, quoted, 0);
retval = quote_string (temp);
free (temp);
}
else /* ${!name[@]} or unquoted ${!name[*]} */
retval = string_list_dollar_at (l, quoted, 0);
#endif
dispose_words (l);
return retval;
+1 -5
View File
@@ -61,10 +61,6 @@ extern int errno;
extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
#if defined (NOTDEF)
extern int last_command_exit_value;
#endif
/* Basic idea:
Segregate the text into 3 sections: preamble (stuff before an open brace),
@@ -190,7 +186,7 @@ brace_expand (text)
if (text[j] == brace_arg_separator)
{ /* { */
strvec_dispose (result);
last_command_exit_value = 1;
set_exit_status (EXECUTION_FAILURE);
report_error ("no closing `%c' in %s", '}', text);
throw_to_top_level ();
}
+1 -1
View File
@@ -123,7 +123,7 @@ file_error_and_exit:
if (flags & FEVAL_LONGJMP)
{
last_command_exit_value = 1;
last_command_exit_value = EXECUTION_FAILURE;
jump_to_top_level (EXITPROG);
}
+2
View File
@@ -339,6 +339,7 @@ parse_and_execute (string, from_file, flags)
if (command)
run_unwind_frame ("pe_dispose");
last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */
set_pipestatus_from_exit (last_command_exit_value);
if (subshell_environment)
{
should_jump_to_top_level = 1;
@@ -389,6 +390,7 @@ parse_and_execute (string, from_file, flags)
internal_warning (_("%s: ignoring function definition attempt"), from_file);
should_jump_to_top_level = 0;
last_result = last_command_exit_value = EX_BADUSAGE;
set_pipestatus_from_exit (last_command_exit_value);
reset_parser ();
break;
}
+1 -1
View File
@@ -156,7 +156,7 @@ source_builtin (list)
free (x);
if (posixly_correct && interactive_shell == 0 && executing_command_builtin == 0)
{
last_command_exit_value = 1;
last_command_exit_value = EXECUTION_FAILURE;
jump_to_top_level (EXITPROG);
}
return (EXECUTION_FAILURE);
Vendored
+14
View File
@@ -5392,6 +5392,7 @@ else
#include <stdio.h>
#include <readline/readline.h>
#include "bashansi.h"
extern int rl_gnu_readline_p;
@@ -16915,6 +16916,7 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include "bashansi.h"
main()
{
int fd1, fd2, fl;
@@ -16966,6 +16968,7 @@ else
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bashansi.h"
main()
{
# ifdef GETPGRP_VOID
@@ -17179,6 +17182,7 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
#if !HAVE_DECL_SYS_SIGLIST
extern char *sys_siglist[];
#endif
@@ -17260,6 +17264,7 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
#ifndef UNDER_SYS_SIGLIST_DECLARED
extern char *_sys_siglist[];
#endif
@@ -17667,6 +17672,7 @@ else
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "bashansi.h"
main()
{
#ifdef HAVE_QUAD_T
@@ -18580,6 +18586,7 @@ else
# include <ndir.h>
# endif
#endif /* HAVE_DIRENT_H */
#include "bashansi.h"
main()
{
DIR *dir;
@@ -18693,6 +18700,7 @@ else
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bashansi.h"
#ifndef __STDC__
# ifndef const
# define const
@@ -18814,6 +18822,7 @@ else
#include <sys/types.h>
#include <signal.h>
#include <setjmp.h>
#include "bashansi.h"
main()
{
@@ -18953,6 +18962,7 @@ else
/* end confdefs.h. */
#include <stdio.h>
#include "bashansi.h"
main()
{
@@ -19192,6 +19202,7 @@ else
#include <stdio.h>
#include <string.h>
#include "bashansi.h"
int
main()
@@ -19304,6 +19315,7 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
typedef RETSIGTYPE sigfunc();
@@ -19455,6 +19467,7 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "bashansi.h"
/* Add more tests in here as appropriate. */
main()
@@ -19765,6 +19778,7 @@ else
#include <sys/types.h>
#include <signal.h>
#include "bashansi.h"
#ifndef NSIG
# define NSIG 64
+1 -1
View File
@@ -201,7 +201,7 @@ report_error (format, va_alist)
if (exit_immediately_on_error)
{
if (last_command_exit_value == 0)
last_command_exit_value = 1;
last_command_exit_value = EXECUTION_FAILURE;
exit_shell (last_command_exit_value);
}
}
+2 -2
View File
@@ -108,7 +108,7 @@ reader_loop ()
leave existing non-zero values (e.g., > 128 on signal)
alone. */
if (last_command_exit_value == 0)
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
if (subshell_environment)
{
current_command = (COMMAND *)NULL;
@@ -144,7 +144,7 @@ reader_loop ()
{
if (interactive_shell == 0 && read_but_dont_execute)
{
last_command_exit_value = EXECUTION_SUCCESS;
set_exit_status (EXECUTION_SUCCESS);
dispose_command (global_command);
global_command = (COMMAND *)NULL;
}
+1 -1
View File
@@ -1177,7 +1177,7 @@ expr_streval (tok, e, lvalue)
value = tok;
#endif
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (value);
#if defined (ARRAY_VARS)
+1
View File
@@ -81,6 +81,7 @@ extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *));
extern void exit_shell __P((int)) __attribute__((__noreturn__));
extern void sh_exit __P((int)) __attribute__((__noreturn__));
extern void subshell_exit __P((int)) __attribute__((__noreturn__));
extern void set_exit_status __P((int));
extern void disable_priv_mode __P((void));
extern void unbind_args __P((void));
+3 -1
View File
@@ -1994,7 +1994,7 @@ make_child (command, async_p)
if (the_pipeline)
kill_current_pipeline ();
last_command_exit_value = EX_NOEXEC;
set_exit_status (EX_NOEXEC);
throw_to_top_level (); /* Reset signals, etc. */
}
@@ -2552,6 +2552,7 @@ wait_sigint_handler (sig)
(this_shell_builtin && this_shell_builtin == wait_builtin))
{
last_command_exit_value = 128+SIGINT;
set_pipestatus_from_exit (last_command_exit_value);
restore_sigint_handler ();
/* If we got a SIGINT while in `wait', and SIGINT is trapped, do
what POSIX.2 says (see builtins/wait.def for more info). */
@@ -2586,6 +2587,7 @@ wait_sigint_handler (sig)
else
{
last_command_exit_value = 128+SIGINT;
set_pipestatus_from_exit (last_command_exit_value);
restore_sigint_handler ();
kill (getpid (), SIGINT);
}
+2
View File
@@ -612,6 +612,8 @@ matched:
{
brcnt++;
brchr = *p;
/* If brchr == ':' we need to check that the rest of the characters
form a valid character class name. */
}
/* we only want to check brchr if we set it above */
else if (c == L(']') && brcnt > 1 && brchr != 0 && oc == brchr)
+1 -1
View File
@@ -275,7 +275,7 @@ strtoumax.o: ${BUILD_DIR}/config.h
strtrans.o: ${BUILD_DIR}/config.h
times.o: ${BUILD_DIR}/config.h
timeval.o: ${BUILD_DIR}/config.h
tmpfile.o: ${BUILD_DIR}/config.h
tmpfile.o: ${BUILD_DIR}/config.h ${topdir}/config-top.h
uconvert.o: ${BUILD_DIR}/config.h
ufuncs.o: ${BUILD_DIR}/config.h
unicode.o: ${BUILD_DIR}/config.h
+54 -14
View File
@@ -76,13 +76,13 @@ utf8_mbsnlen(src, srclen, maxlen)
return (count);
}
/* Adapted from GNU gnulib */
/* Adapted from GNU gnulib. Handles UTF-8 characters up to 4 bytes long */
int
utf8_mblen (s, n)
const char *s;
size_t n;
{
unsigned char c, c1;
unsigned char c, c1, c2, c3;
if (s == 0)
return (0); /* no shift states */
@@ -100,31 +100,71 @@ utf8_mblen (s, n)
if (n == 1)
return -2;
if (n >= 2 && (s[1] ^ 0x80) < 0x40)
/*
* c c1
*
* U+0080..U+07FF C2..DF 80..BF
*/
if (n >= 2 && (c1 ^ 0x80) < 0x40) /* 0x80..0xbf */
return 2;
}
else if (c < 0xf0)
{
if (n <= 2)
if (n == 1)
return -2;
if (n >= 3
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
/*
* c c1 c2
*
* U+0800..U+0FFF E0 A0..BF 80..BF
* U+1000..U+CFFF E1..EC 80..BF 80..BF
* U+D000..U+D7FF ED 80..9F 80..BF
* U+E000..U+FFFF EE..EF 80..BF 80..BF
*/
if ((c1 ^ 0x80) < 0x40
&& (c >= 0xe1 || c1 >= 0xa0)
&& (c != 0xed || c1 < 0xa0))
return 3;
{
if (n == 2)
return -2; /* incomplete */
c2 = (unsigned char)s[2];
if ((c2 ^ 0x80) < 0x40)
return 3;
}
}
else if (c <= 0xf4)
{
if (n <= 3)
if (n == 1)
return -2;
if (n >= 4
&& (s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40
/*
* c c1 c2 c3
*
* U+10000..U+3FFFF F0 90..BF 80..BF 80..BF
* U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF
* U+100000..U+10FFFF F4 80..8F 80..BF 80..BF
*/
if (((c1 ^ 0x80) < 0x40)
&& (c >= 0xf1 || c1 >= 0x90)
&& (c < 0xf4 || (c == 0xf4 && c1 < 0x90)))
return 4;
{
if (n == 2)
return -2; /* incomplete */
c2 = (unsigned char)s[2];
if ((c2 ^ 0x80) < 0x40)
{
if (n == 3)
return -2;
c3 = (unsigned char)s[3];
if ((c3 ^ 0x80) < 0x40)
return 4;
}
}
}
}
/* invalid or incomplete multibyte character */
+6 -6
View File
@@ -1,7 +1,7 @@
/* make_cmd.c -- Functions for making instances of the various
parser constructs. */
/* Copyright (C) 1989-2018 Free Software Foundation, Inc.
/* Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -235,7 +235,7 @@ make_select_command (name, map_list, action, lineno)
#if defined (SELECT_COMMAND)
return (make_for_or_select (cm_select, name, map_list, action, lineno));
#else
last_command_exit_value = 2;
set_exit_status (2);
return ((COMMAND *)NULL);
#endif
}
@@ -321,7 +321,7 @@ make_arith_for_command (exprs, action, lineno)
free (init);
free (test);
free (step);
last_command_exit_value = 2;
set_exit_status (2);
return ((COMMAND *)NULL);
}
@@ -337,7 +337,7 @@ make_arith_for_command (exprs, action, lineno)
return (make_command (cm_arith_for, (SIMPLE_COM *)temp));
#else
dispose_words (exprs);
last_command_exit_value = 2;
set_exit_status (2);
return ((COMMAND *)NULL);
#endif /* ARITH_FOR_COMMAND */
}
@@ -447,7 +447,7 @@ make_arith_command (exp)
return (command);
#else
last_command_exit_value = 2;
set_exit_status (2);
return ((COMMAND *)NULL);
#endif
}
@@ -490,7 +490,7 @@ make_cond_command (cond_node)
return (command);
#else
last_command_exit_value = 2;
set_exit_status (2);
return ((COMMAND *)NULL);
#endif
}
+6 -3
View File
@@ -6266,6 +6266,7 @@ report_syntax_error (message)
if (interactive && EOF_Reached)
EOF_Reached = 0;
last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
set_pipestatus_from_exit (last_command_exit_value);
return;
}
@@ -6287,6 +6288,7 @@ report_syntax_error (message)
print_offending_line ();
last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
set_pipestatus_from_exit (last_command_exit_value);
return;
}
@@ -6318,6 +6320,7 @@ report_syntax_error (message)
}
last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
set_pipestatus_from_exit (last_command_exit_value);
}
/* ??? Needed function. ??? We have to be able to discard the constructs
@@ -6490,7 +6493,7 @@ parse_string_to_word_list (s, flags, whom)
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
@@ -6554,7 +6557,7 @@ parse_compound_assignment (retlenp)
if (wl == &parse_string_error)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
last_read_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
@@ -6815,7 +6818,7 @@ set_line_mbstate ()
if (locale_utf8locale)
{
if ((unsigned char)shell_input_line[previ] < 128)
if ((unsigned char)shell_input_line[previ] < 128) /* i != previ */
mbclen = 1;
else
{
+613 -779
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -120,7 +120,7 @@ do { \
{ \
if (fd >= 0) \
close (fd); \
last_command_exit_value = EXECUTION_FAILURE;\
set_exit_status (EXECUTION_FAILURE);\
return ((e) == 0 ? EINVAL : (e));\
} \
} while (0)
+7
View File
@@ -1038,6 +1038,13 @@ subshell_exit (s)
sh_exit (s);
}
void
set_exit_status (s)
int s;
{
set_pipestatus_from_exit (last_command_exit_value = s);
}
/* Source the bash startup files. If POSIXLY_CORRECT is non-zero, we obey
the Posix.2 startup file rules: $ENV is expanded, and if the file it
names exists, that file is sourced. The Posix.2 rules are in effect
+4
View File
@@ -394,6 +394,7 @@ throw_to_top_level ()
{
if (last_command_exit_value < 128)
last_command_exit_value = 128 + SIGINT;
set_pipestatus_from_exit (last_command_exit_value);
print_newline = 1;
DELINTERRUPT;
}
@@ -404,6 +405,7 @@ throw_to_top_level ()
last_command_exit_signal = (last_command_exit_value > 128) ?
(last_command_exit_value - 128) : 0;
last_command_exit_value |= 128;
set_pipestatus_from_exit (last_command_exit_value);
/* Run any traps set on SIGINT, mostly for interactive shells */
if (signal_is_trapped (SIGINT))
@@ -647,6 +649,7 @@ sigint_sighandler (sig)
if (wait_intr_flag)
{
last_command_exit_value = 128 + sig;
set_pipestatus_from_exit (last_command_exit_value);
wait_signal_received = sig;
SIGRETURN (0);
}
@@ -655,6 +658,7 @@ sigint_sighandler (sig)
{
interrupt_immediately = 0;
last_command_exit_value = 128 + sig;
set_pipestatus_from_exit (last_command_exit_value);
throw_to_top_level ();
}
#if defined (READLINE)
+22 -18
View File
@@ -3270,7 +3270,7 @@ do_assignment_internal (word, expand)
retval = 0; /* assignment failure */
else if (noassign_p (entry))
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
retval = 1; /* error status, but not assignment failure */
}
else
@@ -4803,6 +4803,8 @@ match_upattern (string, pat, mtype, sp, ep)
end = string + len;
mlen = umatchlen (pat, len);
if (mlen > len)
return (0);
switch (mtype)
{
@@ -4958,6 +4960,8 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep)
return (0);
mlen = wmatchlen (wpat, wstrlen);
if (mlen > wstrlen)
return (0);
/* itrace("wmatchlen (%ls) -> %d", wpat, mlen); */
switch (mtype)
@@ -6501,7 +6505,7 @@ array_length_reference (s)
{
c = *--t;
*t = '\0';
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (s);
*t = c;
return (-1);
@@ -6784,7 +6788,7 @@ expand_arrayref:
/* y=2 ; typeset -n x=y; echo ${x} is not the same as echo ${2} in ksh */
if (temp && *temp && legal_identifier (temp) == 0)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: invalid variable name for name reference"), temp);
temp = &expand_param_error;
}
@@ -7143,7 +7147,7 @@ parameter_brace_expand_error (name, value, check_null)
WORD_LIST *l;
char *temp;
last_command_exit_value = EXECUTION_FAILURE; /* ensure it's non-zero */
set_exit_status (EXECUTION_FAILURE); /* ensure it's non-zero */
if (value && *value)
{
l = expand_string (value, 0);
@@ -8769,7 +8773,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
number = parameter_brace_expand_length (name);
if (number == INTMAX_MIN && unbound_vars_is_error)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (name+1);
free (name);
return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
@@ -8981,7 +8985,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
{
if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]) && all_element_arrayref == 0)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (name);
FREE (value);
FREE (temp);
@@ -9082,7 +9086,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
default:
case '\0':
bad_substitution:
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: bad substitution"), string ? string : "??");
FREE (value);
FREE (temp);
@@ -9103,7 +9107,7 @@ bad_substitution:
if (temp1 == &expand_param_error || temp1 == &expand_param_fatal)
{
free (name);
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: bad substitution"), string ? string : "??");
return (temp1 == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal);
}
@@ -9191,7 +9195,7 @@ bad_substitution:
temp = (char *)NULL;
if (c == '=' && var_is_special)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("$%s: cannot assign in this way"), name);
free (name);
free (value);
@@ -9288,7 +9292,7 @@ param_expand (string, sindex, quoted, expanded_something,
uerror[0] = '$';
uerror[1] = c;
uerror[2] = '\0';
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (uerror);
return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
}
@@ -9336,7 +9340,7 @@ param_expand (string, sindex, quoted, expanded_something,
uerror[0] = '$';
uerror[1] = c;
uerror[2] = '\0';
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (uerror);
return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
}
@@ -9363,7 +9367,7 @@ param_expand (string, sindex, quoted, expanded_something,
uerror[0] = '$';
uerror[1] = '*';
uerror[2] = '\0';
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (uerror);
return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
}
@@ -9486,7 +9490,7 @@ param_expand (string, sindex, quoted, expanded_something,
uerror[0] = '$';
uerror[1] = '@';
uerror[2] = '\0';
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (uerror);
return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
}
@@ -9637,7 +9641,7 @@ arithsub:
{
if (interactive_shell == 0 && posixly_correct)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
return (&expand_wdesc_fatal);
}
else
@@ -9753,7 +9757,7 @@ comsub:
/* y=2 ; typeset -n x=y; echo $x is not the same as echo $2 in ksh */
if (temp && *temp && legal_identifier (temp) == 0)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("%s: invalid variable name for name reference"), temp);
return (&expand_wdesc_error); /* XXX */
}
@@ -9766,7 +9770,7 @@ comsub:
unbound_variable:
if (unbound_vars_is_error)
{
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
err_unboundvar (temp1);
}
else
@@ -9776,7 +9780,7 @@ unbound_variable:
}
free (temp1);
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
return ((unbound_vars_is_error && interactive_shell == 0)
? &expand_wdesc_fatal
: &expand_wdesc_error);
@@ -10171,7 +10175,7 @@ add_string:
sindex = t_index;
goto add_character;
}
last_command_exit_value = EXECUTION_FAILURE;
set_exit_status (EXECUTION_FAILURE);
report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index);
free (string);
free (istring);
+2 -2
View File
@@ -425,7 +425,7 @@ initialize_shell_variables (env, privmode)
VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
array_needs_making = 1;
}
last_command_exit_value = 1;
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("error importing function definition for `%s'"), tname);
}
@@ -6292,7 +6292,7 @@ sv_locale (name)
#if 1
if (r == 0 && posixly_correct)
last_command_exit_value = 1;
set_exit_status (EXECUTION_FAILURE);
#endif
}