summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshell
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Oracle.COM>2010-04-03 09:48:44 -0700
committerRoger A. Faulkner <Roger.Faulkner@Oracle.COM>2010-04-03 09:48:44 -0700
commit3e14f97f673e8a630f076077de35afdd43dc1587 (patch)
tree9828b6b676f58d7b27dd28e00202d3f3461a5cd8 /usr/src/lib/libshell
parent4f60987df4dcaa54a88b596f861fbf4f3382c65e (diff)
downloadillumos-joyent-3e14f97f673e8a630f076077de35afdd43dc1587.tar.gz
6939349 RFE: Update ksh93 to ast-ksh.2010-03-09
6877392 ksh93 regresses 'uniq -c' performance 6887363 Korn shell 93 sometimes mishandles return value of its child process 6900314 (while true ; do true|true ; done) hang in ioctl() with SIGTTOU 6904557 wc no longer counts number of bytes correctly 6904575 cut -d with multibyte character no longer works 6904597 paste -d no longer works with multibyte characters 6904780 /usr/bin/cksum changed output in snv_128 6904870 uniq -s does not skip multibyte characters correctly 6904878 join -t no longer works with multibyte char separator 6907460 EXIT trap handlers are sometimes executed twice 6909579 libast getopt solaris compatibility broken 6920072 ksh93 tail -f, with unconditional .25s sleep and line parsing, about 37x slower than cat 6932124 mktemp in ksh93 is broken Contributed by Olga Kryzhanovska <olga.kryzhanovska@gmail.com>
Diffstat (limited to 'usr/src/lib/libshell')
-rw-r--r--usr/src/lib/libshell/Makefile.demo17
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/history.h2
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/nval.h2
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/shell.h2
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs12
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math10
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time8
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys8
-rw-r--r--usr/src/lib/libshell/common/RELEASE75
-rw-r--r--usr/src/lib/libshell/common/bltins/alarm.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/cd_pwd.c6
-rw-r--r--usr/src/lib/libshell/common/bltins/cflow.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/enum.c4
-rw-r--r--usr/src/lib/libshell/common/bltins/getopts.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/hist.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/misc.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/mkservice.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/print.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/read.c28
-rw-r--r--usr/src/lib/libshell/common/bltins/regress.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/sleep.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/test.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/trap.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/typeset.c7
-rw-r--r--usr/src/lib/libshell/common/bltins/ulimit.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/umask.c2
-rw-r--r--usr/src/lib/libshell/common/bltins/whence.c2
-rw-r--r--usr/src/lib/libshell/common/data/aliases.c2
-rw-r--r--usr/src/lib/libshell/common/data/bash_pre_rc.sh2
-rw-r--r--usr/src/lib/libshell/common/data/builtins.c6
-rw-r--r--usr/src/lib/libshell/common/data/keywords.c2
-rw-r--r--usr/src/lib/libshell/common/data/lexstates.c4
-rw-r--r--usr/src/lib/libshell/common/data/limits.c2
-rw-r--r--usr/src/lib/libshell/common/data/msg.c2
-rw-r--r--usr/src/lib/libshell/common/data/options.c5
-rw-r--r--usr/src/lib/libshell/common/data/signals.c2
-rw-r--r--usr/src/lib/libshell/common/data/solaris_cmdlist.h127
-rw-r--r--usr/src/lib/libshell/common/data/strdata.c2
-rw-r--r--usr/src/lib/libshell/common/data/testops.c2
-rw-r--r--usr/src/lib/libshell/common/data/variables.c2
-rw-r--r--usr/src/lib/libshell/common/edit/completion.c2
-rw-r--r--usr/src/lib/libshell/common/edit/edit.c2
-rw-r--r--usr/src/lib/libshell/common/edit/emacs.c2
-rw-r--r--usr/src/lib/libshell/common/edit/hexpand.c2
-rw-r--r--usr/src/lib/libshell/common/edit/history.c2
-rw-r--r--usr/src/lib/libshell/common/edit/vi.c2
-rw-r--r--usr/src/lib/libshell/common/features/externs3
-rw-r--r--usr/src/lib/libshell/common/features/math.sh2
-rw-r--r--usr/src/lib/libshell/common/features/rlimits2
-rw-r--r--usr/src/lib/libshell/common/include/argnod.h2
-rw-r--r--usr/src/lib/libshell/common/include/builtins.h2
-rw-r--r--usr/src/lib/libshell/common/include/defs.h12
-rw-r--r--usr/src/lib/libshell/common/include/edit.h2
-rw-r--r--usr/src/lib/libshell/common/include/env.h2
-rw-r--r--usr/src/lib/libshell/common/include/fault.h2
-rw-r--r--usr/src/lib/libshell/common/include/fcin.h2
-rw-r--r--usr/src/lib/libshell/common/include/history.h2
-rw-r--r--usr/src/lib/libshell/common/include/io.h2
-rw-r--r--usr/src/lib/libshell/common/include/jobs.h2
-rw-r--r--usr/src/lib/libshell/common/include/lexstates.h2
-rw-r--r--usr/src/lib/libshell/common/include/name.h6
-rw-r--r--usr/src/lib/libshell/common/include/national.h2
-rw-r--r--usr/src/lib/libshell/common/include/nval.h2
-rw-r--r--usr/src/lib/libshell/common/include/path.h2
-rw-r--r--usr/src/lib/libshell/common/include/regress.h2
-rw-r--r--usr/src/lib/libshell/common/include/shell.h2
-rw-r--r--usr/src/lib/libshell/common/include/shlex.h2
-rw-r--r--usr/src/lib/libshell/common/include/shnodes.h2
-rw-r--r--usr/src/lib/libshell/common/include/shtable.h2
-rw-r--r--usr/src/lib/libshell/common/include/streval.h4
-rw-r--r--usr/src/lib/libshell/common/include/terminal.h2
-rw-r--r--usr/src/lib/libshell/common/include/test.h2
-rw-r--r--usr/src/lib/libshell/common/include/timeout.h2
-rw-r--r--usr/src/lib/libshell/common/include/ulimit.h2
-rw-r--r--usr/src/lib/libshell/common/include/variables.h2
-rw-r--r--usr/src/lib/libshell/common/include/version.h4
-rw-r--r--usr/src/lib/libshell/common/scripts/cpvprint.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/crawlsrccomments.sh20
-rw-r--r--usr/src/lib/libshell/common/scripts/filemutexdemo1.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/filetree1.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/gnaw.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/mandelbrotset1.sh14
-rw-r--r--usr/src/lib/libshell/common/scripts/multifollow.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/numtree1.sh34
-rw-r--r--usr/src/lib/libshell/common/scripts/primenumbers1.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/rssread.sh19
-rw-r--r--usr/src/lib/libshell/common/scripts/shcalc.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/shircbot.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/shlint.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/shman.sh7
-rw-r--r--usr/src/lib/libshell/common/scripts/shnote.sh11
-rw-r--r--usr/src/lib/libshell/common/scripts/shpiano.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/shtinyurl.sh11
-rw-r--r--usr/src/lib/libshell/common/scripts/shtwitter.sh11
-rw-r--r--usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh13
-rw-r--r--usr/src/lib/libshell/common/scripts/simplefiletree1.sh11
-rw-r--r--usr/src/lib/libshell/common/scripts/svcproptree1.sh9
-rw-r--r--usr/src/lib/libshell/common/scripts/termclock.sh7
-rw-r--r--usr/src/lib/libshell/common/scripts/test_net_sctp.sh3
-rw-r--r--usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh3
-rw-r--r--usr/src/lib/libshell/common/sh.136
-rw-r--r--usr/src/lib/libshell/common/sh/args.c2
-rw-r--r--usr/src/lib/libshell/common/sh/arith.c8
-rw-r--r--usr/src/lib/libshell/common/sh/array.c19
-rw-r--r--usr/src/lib/libshell/common/sh/bash.c2
-rw-r--r--usr/src/lib/libshell/common/sh/defs.c2
-rw-r--r--usr/src/lib/libshell/common/sh/deparse.c2
-rw-r--r--usr/src/lib/libshell/common/sh/env.c2
-rw-r--r--usr/src/lib/libshell/common/sh/expand.c2
-rw-r--r--usr/src/lib/libshell/common/sh/fault.c16
-rw-r--r--usr/src/lib/libshell/common/sh/fcin.c4
-rw-r--r--usr/src/lib/libshell/common/sh/init.c44
-rw-r--r--usr/src/lib/libshell/common/sh/io.c4
-rw-r--r--usr/src/lib/libshell/common/sh/jobs.c29
-rw-r--r--usr/src/lib/libshell/common/sh/lex.c15
-rw-r--r--usr/src/lib/libshell/common/sh/macro.c4
-rw-r--r--usr/src/lib/libshell/common/sh/main.c5
-rw-r--r--usr/src/lib/libshell/common/sh/name.c87
-rw-r--r--usr/src/lib/libshell/common/sh/nvdisc.c30
-rw-r--r--usr/src/lib/libshell/common/sh/nvtree.c13
-rw-r--r--usr/src/lib/libshell/common/sh/nvtype.c3
-rw-r--r--usr/src/lib/libshell/common/sh/parse.c38
-rw-r--r--usr/src/lib/libshell/common/sh/path.c18
-rw-r--r--usr/src/lib/libshell/common/sh/pmain.c2
-rw-r--r--usr/src/lib/libshell/common/sh/shcomp.c4
-rw-r--r--usr/src/lib/libshell/common/sh/streval.c37
-rw-r--r--usr/src/lib/libshell/common/sh/string.c2
-rw-r--r--usr/src/lib/libshell/common/sh/subshell.c3
-rw-r--r--usr/src/lib/libshell/common/sh/suid_exec.c2
-rw-r--r--usr/src/lib/libshell/common/sh/tdump.c4
-rw-r--r--usr/src/lib/libshell/common/sh/timers.c2
-rw-r--r--usr/src/lib/libshell/common/sh/trestore.c4
-rw-r--r--usr/src/lib/libshell/common/sh/waitevent.c2
-rw-r--r--usr/src/lib/libshell/common/sh/xec.c15
-rw-r--r--usr/src/lib/libshell/common/tests/alias.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/append.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/arith.sh32
-rw-r--r--usr/src/lib/libshell/common/tests/arrays.sh37
-rw-r--r--usr/src/lib/libshell/common/tests/arrays2.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/attributes.sh38
-rw-r--r--usr/src/lib/libshell/common/tests/basic.sh16
-rw-r--r--usr/src/lib/libshell/common/tests/bracket.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/builtins.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/case.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/comvar.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/coprocess.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/cubetype.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/enum.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/exit.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/expand.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/functions.sh27
-rw-r--r--usr/src/lib/libshell/common/tests/glob.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/grep.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/heredoc.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/io.sh4
-rw-r--r--usr/src/lib/libshell/common/tests/nameref.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/options.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/path.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/pointtype.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/quoting.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/quoting2.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/recttype.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/restricted.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/return.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/select.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/shtests35
-rw-r--r--usr/src/lib/libshell/common/tests/sigchld.sh30
-rw-r--r--usr/src/lib/libshell/common/tests/signal.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/statics.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/subshell.sh21
-rw-r--r--usr/src/lib/libshell/common/tests/substring.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh70
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh7
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh163
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh7
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh7
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh9
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh183
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh174
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh193
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh190
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh221
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh66
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh188
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh5
-rw-r--r--usr/src/lib/libshell/common/tests/tilde.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/timetype.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/types.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/variables.sh11
-rw-r--r--usr/src/lib/libshell/common/tests/vartree1.sh2
-rw-r--r--usr/src/lib/libshell/common/tests/vartree2.sh2
-rw-r--r--usr/src/lib/libshell/i386/include/ast/history.h2
-rw-r--r--usr/src/lib/libshell/i386/include/ast/nval.h2
-rw-r--r--usr/src/lib/libshell/i386/include/ast/shell.h2
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs12
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math10
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time8
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys8
-rw-r--r--usr/src/lib/libshell/misc/ERRATA.txt290
-rw-r--r--usr/src/lib/libshell/misc/buildksh93.readme11
-rw-r--r--usr/src/lib/libshell/misc/buildksh93.sh148
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/history.h2
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/nval.h2
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/shell.h2
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs12
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math10
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time8
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys8
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/history.h2
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/nval.h2
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/shell.h2
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs12
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math10
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time8
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys8
285 files changed, 3064 insertions, 924 deletions
diff --git a/usr/src/lib/libshell/Makefile.demo b/usr/src/lib/libshell/Makefile.demo
index 58924e6285..0365970d0e 100644
--- a/usr/src/lib/libshell/Makefile.demo
+++ b/usr/src/lib/libshell/Makefile.demo
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
ROOTDEMODIRBASE= $(ROOT)/usr/demo/ksh
@@ -122,8 +121,10 @@ DEMOFILES= \
tests/sun_solaris_builtin_sum.sh \
tests/sun_solaris_builtin_tail.sh \
tests/sun_solaris_command_substitution.sh \
+ tests/sun_solaris_compound_misc.sh \
tests/sun_solaris_compound_nameref.sh \
tests/sun_solaris_compoundvario.sh \
+ tests/sun_solaris_cr_xxxxxxxx_template.sh \
tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \
tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \
tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \
@@ -145,7 +146,13 @@ DEMOFILES= \
tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh \
tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh \
tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh \
+ tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh \
+ tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh \
+ tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh \
+ tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh \
+ tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh \
tests/sun_solaris_getconf.sh \
+ tests/sun_solaris_locale_misc.sh \
tests/sun_solaris_local_compound_nameref001.sh \
tests/sun_solaris_staticvariables.sh \
tests/sun_solaris_vartree001.sh \
@@ -164,12 +171,8 @@ $(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
$(ROOTDEMODIRBASE)/fun/% := FILEMODE= 755
$(ROOTDEMODIRBASE)/bin/% := FILEMODE= 755
-# ToDO: We should replace the "cat $<" below with $ shcomp $< # once the
-# build machines start to ship /usr/bin/shcomp to compile the scripts
-# in bin/ and use $ shcomp -n $< /dev/null 2>&1 # to do minimum lint-style
-# checks before installation.
$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
- cat "$<" >"$(@F)"
+ /usr/bin/shcomp "$<" >"$(@F)"
$(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)"
$(RM) "$(@F)"
diff --git a/usr/src/lib/libshell/amd64/include/ast/history.h b/usr/src/lib/libshell/amd64/include/ast/history.h
index 0159773f4d..1b0f3ce403 100644
--- a/usr/src/lib/libshell/amd64/include/ast/history.h
+++ b/usr/src/lib/libshell/amd64/include/ast/history.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/amd64/include/ast/nval.h b/usr/src/lib/libshell/amd64/include/ast/nval.h
index a81d34b84a..f5be4fa865 100644
--- a/usr/src/lib/libshell/amd64/include/ast/nval.h
+++ b/usr/src/lib/libshell/amd64/include/ast/nval.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/amd64/include/ast/shell.h b/usr/src/lib/libshell/amd64/include/ast/shell.h
index b5d87afc94..a8c1d85c3b 100644
--- a/usr/src/lib/libshell/amd64/include/ast/shell.h
+++ b/usr/src/lib/libshell/amd64/include/ast/shell.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct
index 6282d28a47..7206f410fa 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_acct_ksh93
#define _def_acct_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_acct 1 /* acct() in default lib(s) */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds
index 71d68caeae..0cc37f2781 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/cmds by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/cmds by iffe version 2009-12-04 : : */
#ifndef _def_cmds_ksh93
#define _def_cmds_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _cmd_newgrp 1 /* newgrp in ?(/usr)/(bin|etc|ucb) */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic
index d13667da0b..0e3fdfa1b3 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/dynamic by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/dynamic by iffe version 2009-12-04 : : */
#ifndef _def_dynamic_ksh93
#define _def_dynamic_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#if SHOPT_DYNAMIC
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs
index 070a127da3..53e7f14ddb 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_execargs_ksh93
#define _def_execargs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs
index 66abda8ba9..c1fa9f9ee1 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/externs by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
@@ -63,10 +63,10 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_exec_attr 1 /* #include <exec_attr.h> ok */
@@ -75,10 +75,12 @@
#define _lib_setreuid 1 /* setreuid() in default lib(s) */
#define _lib_setregid 1 /* setregid() in default lib(s) */
#define _lib_nice 1 /* nice() in default lib(s) */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
#define _lib_fork 1 /* fork() in default lib(s) */
#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */
#define _lib_fchdir 1 /* fchdir() in default lib(s) */
#define _sys_mman 1 /* #include <sys/mman.h> ok */
#define _lib_memcntl 1 /* memcntl() in default lib(s) */
+#define _LIB_secdb 1 /* -lsecdb is a library */
+#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */
+#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */
#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale
index dec6103584..92a8838fc4 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/locale by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
#ifndef _def_locale_ksh93
#define _def_locale_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_locale 1 /* #include <locale.h> ok */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math
index e11378591b..91c42367be 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/math.sh by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,15 +62,15 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
-/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/data/math.tab : : */
+/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options
index eee9524c79..9d0e8e990a 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/options by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/options by iffe version 2009-12-04 : : */
#ifndef _def_options_ksh93
#define _def_options_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define SHELLMAGIC 1
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll
index d3590e8d73..6626a56a90 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/poll by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,10 +62,10 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat
index 2ad9d1c5ea..7e03d66551 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_pstat_ksh93
#define _def_pstat_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits
index 15bdcad01d..64cf916a2b 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/rlimits by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/rlimits by iffe version 2009-12-04 : : */
#ifndef _def_rlimits_ksh93
#define _def_rlimits_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _sys_resource 1 /* #include <sys/resource.h> ok */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp
index 19cc1b9719..bd4a7ccd92 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
#ifndef _def_setjmp_ksh93
#define _def_setjmp_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigsetjmp 1 /* sigsetjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures
index 6f4ad9835d..0b40374d91 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
#ifndef _def_sigfeatures_ksh93
#define _def_sigfeatures_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time
index 9efb09e58c..cb3d0aeb3d 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/time by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
#ifndef _def_time_ksh93
#define _def_time_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_utime 1 /* #include <utime.h> ok */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys
index 564720fc11..43f3314feb 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys
+++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/src/cmd/ksh93/features/ttys by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/ttys by iffe version 2009-12-04 : : */
#ifndef _def_ttys_ksh93
#define _def_ttys_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_termios 1 /* #include <termios.h> ok */
diff --git a/usr/src/lib/libshell/common/RELEASE b/usr/src/lib/libshell/common/RELEASE
index ad43ff6b45..b8fc92511a 100644
--- a/usr/src/lib/libshell/common/RELEASE
+++ b/usr/src/lib/libshell/common/RELEASE
@@ -1,4 +1,73 @@
-09-10-12 --- Release ksh93t+ ---
+10-03-05 --- Release ksh93t+ ---
+10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+ has been added to verify the fix.
+10-03-04 Documentation, comment, and disgnostic spelling typos corrected.
+10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs.
+10-02-12 A bug in which the get discipline function was not invoked for
+ associative array subscripts for unset array elements has been fixed.
+10-02-12 A bug which could occur if the last line of a script was an eval
+ that executed multiple commands has been fixed.
+10-02-02 A buffer overflow in read and another in binary type base64
+ encoding were fixed.
+10-01-20 A bug in the evaluation of arithmetic expression in which the
+ subscript was evaluated twice for $((foo[x++]++)) has been fixed.
+10-01-19 A workaround for a double-free of a trap in both a subshell and its
+ parent has been added.
+10-01-18 A bug in type handling of typeset -H has been fixed.
+10-01-15 The "adding empty subscript" warning now only emitted with -x set.
+10-01-01 A bug in the parser in which '$((case i in i):;esac);:))' was not
+ parsed correctly was fixed.
+10-01-01 A bug in the parser in which '$(( 2 , 3.6 ))' dumped core for locales
+ with radix char , and thousands separator . has been fixed.
+09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD
+ while blocked waiting for process to complete has been fixed.
+09-12-24 ast setlocale() reworked to differentiate env var changes from user
+ override.
+09-12-18 A bug with the SHOPT_BGX option set which disabled traps for signals
+ < SIGCHLD when a trap for a signal > SIGCHLD was set has been fixed.
+09-12-18 A bug where [[ -v var ]] was incorrect for some variables (including
+ LC_* vars) has been fixed.
+09-12-15 A bug that produced a syntax error when a multibyte character
+ straddled a buffer boundary has been fixed.
+09-12-11 A bug where the subscript of an unset variable was not evaluated has
+ been fixed.
+09-12-09 A bug where shcomp dumped core on certain syntax errors has been fixed.
+09-12-07 A bug where a parent shell environment var reset in a subshell removed
+ the value in subsequent children of the parent shell has been fixed.
+09-12-04 A bug in which in some cases a trap in a function executed in
+ a subshell could trigger twice has been fixed.
+09-12-03 A bug in which SHLVL exported with some attributes could cause
+ the shell to abort at startup has been fixed.
+09-12-02 A bug with pipefail in which the shell could hang waiting for the
+ writer to complete before the last reader command has been fixed.
+09-11-30 A bug in which a trap could be inherited by the first element of
+ a pipeline when the command had more than 63 arguments that did
+ not contain any macro expansions has been fixed.
+09-11-19 When read from a terminal was called from with a while or foo loop,
+ and an edit mode was on, a backspace or erase no longer will
+ overwrite the prompt.
+09-11-17 Change .paths parse to handle BUILTIN_LIB=foo BUILTIN_LIB=foo-1.2.
+09-11-17 Inside a function, typeset foo.bar will bind foo to global variable
+ foo if local variable foo does not exist, instead of creating a
+ local variable.
+09-11-17 "read -n1" from the terminal has been fixed to read exactly one character.
+09-11-11 Job control now works for subshell commands, (...).
+09-11-11 If set -e is on for an interactive shell errors in special builtins
+ now cause the shell to exit.
+09-11-11 A bug in which an interrupt handler processed during the read builtin
+ when IFS did not contain a new line has been fixed.
+09-11-09 A bug in which a variable that has been unset in a subshell and then
+ exported from that subshell does not show up in the environment
+ has been fixed.
+09-11-02 ``,2'' is now a valid numeric constant for locales with
+ decimal_point=','.
+09-11-02 A bug where "return" in .profile did not restore the shell state
+ has been fixed.
+09-10-31 A bug that corrupted saved exit status when pids wrapped around has
+ been fixed.
+09-10-26 A bug in { LANG LC_ALL LC_category } ordering has been fixed in -last.
+09-10-16 A bug where notification to libast that the environment has changed
+ has been fixed.
09-10-12 A bug in which a function loaded in a subshell could leave side
effects in the parent shell has been fixed.
09-10-12 A bug in converting a printf %d operand to a number when the operand
@@ -38,7 +107,7 @@
did not display an error message has been fixed.
09-08-24 When processing profiles, ksh93 now violates the POSIX standard and
treats &> as a redirection operator similar to bash.
-09-08-23 A bug in the handling of the trap on SIGPIPE that could lead to am
+09-08-23 A bug in the handling of the trap on SIGPIPE that could lead to a
memory fault has been fixed.
09-08-21 A bug in the handling of the comma operator in arithmetic expressions
that could cause a core dump on some systems has been fixed.
@@ -107,7 +176,7 @@
09-05-01 A bug that caused a core dump when SIGWINCH was received and
both vi and emacs mode were off has been fixed.
09-04-22 Default alias compound='typeset -C' added.
-09-04-15 A bug that caused ${...;} to hang for large files has ben fixed.
+09-04-15 A bug that caused ${...;} to hang for large files has been fixed.
09-04-08 A change was made in the -n option which printed out an incorrect
warning with <>.
09-04-07 The emacs edit command M-_ and M_. and the vi command _ was fixed
diff --git a/usr/src/lib/libshell/common/bltins/alarm.c b/usr/src/lib/libshell/common/bltins/alarm.c
index 17d8442e01..a52130dd9f 100644
--- a/usr/src/lib/libshell/common/bltins/alarm.c
+++ b/usr/src/lib/libshell/common/bltins/alarm.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/cd_pwd.c b/usr/src/lib/libshell/common/bltins/cd_pwd.c
index 58a90a42c4..68b4fead8a 100644
--- a/usr/src/lib/libshell/common/bltins/cd_pwd.c
+++ b/usr/src/lib/libshell/common/bltins/cd_pwd.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -210,7 +210,11 @@ int b_pwd(int argc, char *argv[],void *extra)
{
register int n, flag = 0;
register char *cp;
+#if SHOPT_FS_3D
register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+#else
+ NOT_USED(extra);
+#endif
NOT_USED(argc);
while((n = optget(argv,sh_optpwd))) switch(n)
{
diff --git a/usr/src/lib/libshell/common/bltins/cflow.c b/usr/src/lib/libshell/common/bltins/cflow.c
index cc50817e4c..4d9d10d7f1 100644
--- a/usr/src/lib/libshell/common/bltins/cflow.c
+++ b/usr/src/lib/libshell/common/bltins/cflow.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/enum.c b/usr/src/lib/libshell/common/bltins/enum.c
index 487f9cf1c9..74c991b0ed 100644
--- a/usr/src/lib/libshell/common/bltins/enum.c
+++ b/usr/src/lib/libshell/common/bltins/enum.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -27,7 +27,7 @@ USAGE_LICENSE
"[+DESCRIPTION?\benum\b is a declaration command that creates an enumeration "
"type \atypename\a that can only store any one of the values in the indexed "
"array variable \atypename\a.]"
-"[+?If the list of \avalue\as is ommitted, then \atypename\a must name an "
+"[+?If the list of \avalue\as is omitted, then \atypename\a must name an "
"indexed array variable with at least two elements.]"
"[i:ignorecase?The values are case insensitive.]"
"\n"
diff --git a/usr/src/lib/libshell/common/bltins/getopts.c b/usr/src/lib/libshell/common/bltins/getopts.c
index 5cb81ae4fe..eb76ae3639 100644
--- a/usr/src/lib/libshell/common/bltins/getopts.c
+++ b/usr/src/lib/libshell/common/bltins/getopts.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/hist.c b/usr/src/lib/libshell/common/bltins/hist.c
index d35aec2070..25e98d61cf 100644
--- a/usr/src/lib/libshell/common/bltins/hist.c
+++ b/usr/src/lib/libshell/common/bltins/hist.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/misc.c b/usr/src/lib/libshell/common/bltins/misc.c
index c66dff20bf..237a4448ee 100644
--- a/usr/src/lib/libshell/common/bltins/misc.c
+++ b/usr/src/lib/libshell/common/bltins/misc.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/mkservice.c b/usr/src/lib/libshell/common/bltins/mkservice.c
index 8136b4c296..0a1eeb2bce 100644
--- a/usr/src/lib/libshell/common/bltins/mkservice.c
+++ b/usr/src/lib/libshell/common/bltins/mkservice.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/print.c b/usr/src/lib/libshell/common/bltins/print.c
index 18b51aab67..41db7b3e46 100644
--- a/usr/src/lib/libshell/common/bltins/print.c
+++ b/usr/src/lib/libshell/common/bltins/print.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/read.c b/usr/src/lib/libshell/common/bltins/read.c
index d5df0ca53d..6abf7a82f6 100644
--- a/usr/src/lib/libshell/common/bltins/read.c
+++ b/usr/src/lib/libshell/common/bltins/read.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -146,7 +146,6 @@ int b_read(int argc,char *argv[], void *extra)
if(fd<0 || !(r&IOREAD))
errormsg(SH_DICT,ERROR_system(1),e_file+4);
/* look for prompt */
- shp->prompt = default_prompt;
if((name = *argv) && (name=strchr(name,'?')) && (r&IOTTY))
r = strlen(name++);
else
@@ -162,6 +161,7 @@ int b_read(int argc,char *argv[], void *extra)
rp->plen = r;
}
bypass:
+ shp->prompt = default_prompt;
if(r && (shp->prompt=(char*)sfreserve(sfstderr,r,SF_LOCKR)))
{
memcpy(shp->prompt,name,r);
@@ -342,16 +342,22 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
int f;
for (;;)
{
- c = (flags&NN_FLAG) ? -size : -1;
+ c = size;
cp = sfreserve(iop,c,SF_LOCKR);
f = 1;
if(cp)
m = sfvalue(iop);
- else
+ else if(flags&NN_FLAG)
{
- m = (cp = sfreserve(iop,size,0)) ? sfvalue(iop) : 0;
+ c = size;
+ m = (cp = sfreserve(iop,c,0)) ? sfvalue(iop) : 0;
f = 0;
}
+ else
+ {
+ c = sfvalue(iop);
+ m = (cp = sfreserve(iop,c,SF_LOCKR)) ? sfvalue(iop) : 0;
+ }
if(m>0 && (flags&N_FLAG) && !binary && (v=memchr(cp,'\n',m)))
{
*v++ = 0;
@@ -404,9 +410,13 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
cur = var;
#endif
*cur = 0;
- if(c>=size)
- sfclrerr(iop);
- break;
+ if(c>=size || (flags&N_FLAG) || m==0)
+ {
+ if(m)
+ sfclrerr(iop);
+ break;
+ }
+ size -= c;
}
}
if(timeslot)
@@ -419,7 +429,7 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
{
Namval_t *mp;
if(var==buf)
- var = memdup(var,c);
+ var = memdup(var,c+1);
nv_putval(np,var,NV_RAW);
nv_setsize(np,c);
if(!nv_isattr(np,NV_IMPORT|NV_EXPORT) && (mp=(Namval_t*)np->nvenv))
diff --git a/usr/src/lib/libshell/common/bltins/regress.c b/usr/src/lib/libshell/common/bltins/regress.c
index b736fd1534..d6d39bf5c9 100644
--- a/usr/src/lib/libshell/common/bltins/regress.c
+++ b/usr/src/lib/libshell/common/bltins/regress.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/sleep.c b/usr/src/lib/libshell/common/bltins/sleep.c
index a0648632dd..6121cfe62b 100644
--- a/usr/src/lib/libshell/common/bltins/sleep.c
+++ b/usr/src/lib/libshell/common/bltins/sleep.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/test.c b/usr/src/lib/libshell/common/bltins/test.c
index ec8095107d..2cffd57134 100644
--- a/usr/src/lib/libshell/common/bltins/test.c
+++ b/usr/src/lib/libshell/common/bltins/test.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/trap.c b/usr/src/lib/libshell/common/bltins/trap.c
index 494d5d8431..cd6a2e8d9b 100644
--- a/usr/src/lib/libshell/common/bltins/trap.c
+++ b/usr/src/lib/libshell/common/bltins/trap.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/typeset.c b/usr/src/lib/libshell/common/bltins/typeset.c
index 6428248499..f93bcf3d54 100644
--- a/usr/src/lib/libshell/common/bltins/typeset.c
+++ b/usr/src/lib/libshell/common/bltins/typeset.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -540,7 +540,12 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
else if(nv_isnull(np))
nv_onattr(np,NV_ARRAY|(comvar?NV_NOFREE:0));
else
+ {
+ Namarr_t *ap=nv_arrayptr(np);
+ if(ap && comvar)
+ ap->nelem |= ARRAY_TREE;
nv_putsub(np, (char*)0, 0);
+ }
}
else if(nvflags&NV_ARRAY)
{
diff --git a/usr/src/lib/libshell/common/bltins/ulimit.c b/usr/src/lib/libshell/common/bltins/ulimit.c
index 7c8e9378d3..77ce771195 100644
--- a/usr/src/lib/libshell/common/bltins/ulimit.c
+++ b/usr/src/lib/libshell/common/bltins/ulimit.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/umask.c b/usr/src/lib/libshell/common/bltins/umask.c
index d8bc67647a..0067c89dbe 100644
--- a/usr/src/lib/libshell/common/bltins/umask.c
+++ b/usr/src/lib/libshell/common/bltins/umask.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/bltins/whence.c b/usr/src/lib/libshell/common/bltins/whence.c
index 4714c78b10..580753607a 100644
--- a/usr/src/lib/libshell/common/bltins/whence.c
+++ b/usr/src/lib/libshell/common/bltins/whence.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/aliases.c b/usr/src/lib/libshell/common/data/aliases.c
index 5b7298b299..e3a7430540 100644
--- a/usr/src/lib/libshell/common/data/aliases.c
+++ b/usr/src/lib/libshell/common/data/aliases.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/bash_pre_rc.sh b/usr/src/lib/libshell/common/data/bash_pre_rc.sh
index 56767363dc..e5a7bd3736 100644
--- a/usr/src/lib/libshell/common/data/bash_pre_rc.sh
+++ b/usr/src/lib/libshell/common/data/bash_pre_rc.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/data/builtins.c b/usr/src/lib/libshell/common/data/builtins.c
index 94b34c77dd..bfd390187c 100644
--- a/usr/src/lib/libshell/common/data/builtins.c
+++ b/usr/src/lib/libshell/common/data/builtins.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -1269,9 +1269,9 @@ USAGE_LICENSE
"[u]#[fd:=0?Read from file descriptor number \afd\a instead of standard input.]"
"[t]:[timeout?Specify a timeout \atimeout\a in seconds when reading from "
"a terminal or pipe.]"
-"[n]#[nbyte?Read at most \ansize\a characters. For binary fields \asize\a "
+"[n]#[nchar?Read at most \anchar\a characters. For binary fields \asize\a "
"will be in bytes.]"
-"[N]#[nbyte?Read exactly \ansize\a characters. For binary fields \asize\a "
+"[N]#[nchar?Read exactly \anchar\a characters. For binary fields \asize\a "
"will be in bytes.]"
"[v?When reading from a terminal the value of the first variable is displayed "
"and used as a default value.]"
diff --git a/usr/src/lib/libshell/common/data/keywords.c b/usr/src/lib/libshell/common/data/keywords.c
index ccacdb95ee..8520af64d0 100644
--- a/usr/src/lib/libshell/common/data/keywords.c
+++ b/usr/src/lib/libshell/common/data/keywords.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/lexstates.c b/usr/src/lib/libshell/common/data/lexstates.c
index 3decd14dbc..7da677c1b8 100644
--- a/usr/src/lib/libshell/common/data/lexstates.c
+++ b/usr/src/lib/libshell/common/data/lexstates.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -387,7 +387,7 @@ const char *sh_lexrstates[ST_NONE] =
const char e_lexversion[] = "%d: invalid binary script version";
const char e_lexspace[] = "line %d: use space or tab to separate operators %c and %c";
-const char e_lexslash[] = "line %d: $ not preceeded by \\";
+const char e_lexslash[] = "line %d: $ not preceded by \\";
const char e_lexsyntax1[] = "syntax error at line %d: `%s' %s";
const char e_lexsyntax2[] = "syntax error: `%s' %s";
const char e_lexsyntax3[] = "syntax error at line %d: duplicate label %s";
diff --git a/usr/src/lib/libshell/common/data/limits.c b/usr/src/lib/libshell/common/data/limits.c
index ae13d21df5..3bea9cc9e5 100644
--- a/usr/src/lib/libshell/common/data/limits.c
+++ b/usr/src/lib/libshell/common/data/limits.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/msg.c b/usr/src/lib/libshell/common/data/msg.c
index 022aa5390d..27ce63a4ec 100644
--- a/usr/src/lib/libshell/common/data/msg.c
+++ b/usr/src/lib/libshell/common/data/msg.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/options.c b/usr/src/lib/libshell/common/data/options.c
index b2894b90e7..5643b86b5a 100644
--- a/usr/src/lib/libshell/common/data/options.c
+++ b/usr/src/lib/libshell/common/data/options.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -19,8 +19,7 @@
***********************************************************************/
#pragma prototyped
-#include <defs.h>
-#include "FEATURE/options"
+#include "defs.h"
#include "name.h"
#include "shtable.h"
diff --git a/usr/src/lib/libshell/common/data/signals.c b/usr/src/lib/libshell/common/data/signals.c
index 371ffa2eac..bac1031045 100644
--- a/usr/src/lib/libshell/common/data/signals.c
+++ b/usr/src/lib/libshell/common/data/signals.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/solaris_cmdlist.h b/usr/src/lib/libshell/common/data/solaris_cmdlist.h
index 4cb7672636..f394e79aa7 100644
--- a/usr/src/lib/libshell/common/data/solaris_cmdlist.h
+++ b/usr/src/lib/libshell/common/data/solaris_cmdlist.h
@@ -20,8 +20,7 @@
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SOLARIS_KSH_CMDLIST_H
@@ -38,16 +37,6 @@ extern "C" {
* tools
*/
-/* POSIX compatible commands */
-#ifdef _NOT_YET
-#define XPG6CMDLIST(f) \
- { "/usr/xpg6/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#define XPG4CMDLIST(f) \
- { "/usr/xpg4/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#else
-#define XPG6CMDLIST(f)
-#define XPG4CMDLIST(f)
-#endif /* NOT_YET */
/*
* Commands which are 100% compatible with native Solaris versions (/bin is
* a softlink to ./usr/bin, ksh93 takes care about the lookup)
@@ -60,6 +49,18 @@ extern "C" {
{ "/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
#define SUSRBINCMDLIST(f) \
{ "/usr/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+/* POSIX compatible commands */
+#define XPG6CMDLIST(f) \
+ { "/usr/xpg6/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#define XPG4CMDLIST(f) \
+ { "/usr/xpg4/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#ifdef SHOPT_USR_GNU_BIN_BUILTINS
+/* GNU coreutils compatible commands */
+#define GNUCMDLIST(f) \
+ { "/usr/gnu/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#else
+#define GNUCMDLIST(f)
+#endif
/*
* Make all ksh93 builtins accessible when /usr/ast/bin was added to
* /usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
@@ -73,89 +74,115 @@ extern "C" {
#undef mktemp
/* Generated data, do not edit. */
-XPG4CMDLIST(basename)
ASTCMDLIST(basename)
-BINCMDLIST(cat)
+GNUCMDLIST(basename)
+XPG4CMDLIST(basename)
ASTCMDLIST(cat)
-XPG4CMDLIST(chgrp)
+BINCMDLIST(cat)
ASTCMDLIST(chgrp)
+// XPG4CMDLIST(chgrp)
ASTCMDLIST(chmod)
-XPG4CMDLIST(chown)
-BINCMDLIST(chown)
ASTCMDLIST(chown)
-BINCMDLIST(cksum)
+// XPG4CMDLIST(chown)
+BINCMDLIST(chown)
ASTCMDLIST(cksum)
-BINCMDLIST(cmp)
+BINCMDLIST(cksum)
+GNUCMDLIST(cksum)
ASTCMDLIST(cmp)
-BINCMDLIST(comm)
+BINCMDLIST(cmp)
ASTCMDLIST(comm)
-XPG4CMDLIST(cp)
+BINCMDLIST(comm)
+GNUCMDLIST(comm)
ASTCMDLIST(cp)
-BINCMDLIST(cut)
+// XPG4CMDLIST(cp)
ASTCMDLIST(cut)
-XPG4CMDLIST(date)
+BINCMDLIST(cut)
+GNUCMDLIST(cut)
ASTCMDLIST(date)
+// XPG4CMDLIST(date)
ASTCMDLIST(dirname)
+BINCMDLIST(dirname)
+GNUCMDLIST(dirname)
ASTCMDLIST(egrep)
-XPG4CMDLIST(expr)
+XPG4CMDLIST(egrep)
ASTCMDLIST(expr)
+GNUCMDLIST(expr)
+XPG6CMDLIST(expr)
ASTCMDLIST(fds)
ASTCMDLIST(fgrep)
+XPG4CMDLIST(fgrep)
ASTCMDLIST(fmt)
-BINCMDLIST(fold)
ASTCMDLIST(fold)
+BINCMDLIST(fold)
+GNUCMDLIST(fold)
ASTCMDLIST(grep)
-BINCMDLIST(head)
+XPG4CMDLIST(grep)
ASTCMDLIST(head)
-XPG4CMDLIST(id)
+BINCMDLIST(head)
ASTCMDLIST(id)
-BINCMDLIST(join)
+XPG4CMDLIST(id)
ASTCMDLIST(join)
-XPG4CMDLIST(ln)
+BINCMDLIST(join)
+GNUCMDLIST(join)
ASTCMDLIST(ln)
-BINCMDLIST(logname)
+// XPG4CMDLIST(ln)
ASTCMDLIST(logname)
+BINCMDLIST(logname)
+GNUCMDLIST(logname)
ASTCMDLIST(md5sum)
-BINCMDLIST(mkdir)
ASTCMDLIST(mkdir)
-BINCMDLIST(mkfifo)
+BINCMDLIST(mkdir)
+GNUCMDLIST(mkdir)
ASTCMDLIST(mkfifo)
-BINCMDLIST(mktemp)
+BINCMDLIST(mkfifo)
+GNUCMDLIST(mkfifo)
ASTCMDLIST(mktemp)
-XPG4CMDLIST(mv)
+BINCMDLIST(mktemp)
+GNUCMDLIST(mktemp)
ASTCMDLIST(mv)
-BINCMDLIST(paste)
+// XPG4CMDLIST(mv)
ASTCMDLIST(paste)
-BINCMDLIST(pathchk)
+BINCMDLIST(paste)
+GNUCMDLIST(paste)
ASTCMDLIST(pathchk)
+BINCMDLIST(pathchk)
+GNUCMDLIST(pathchk)
ASTCMDLIST(readlink)
-BINCMDLIST(rev)
ASTCMDLIST(rev)
-XPG4CMDLIST(rm)
+BINCMDLIST(rev)
ASTCMDLIST(rm)
-BINCMDLIST(rmdir)
+XPG4CMDLIST(rm)
ASTCMDLIST(rmdir)
-XPG4CMDLIST(stty)
+BINCMDLIST(rmdir)
+GNUCMDLIST(rmdir)
+GNUCMDLIST(sleep)
ASTCMDLIST(stty)
-BINCMDLIST(sum)
+// XPG4CMDLIST(stty)
ASTCMDLIST(sum)
-SUSRBINCMDLIST(sync)
-SBINCMDLIST(sync)
-BINCMDLIST(sync)
+BINCMDLIST(sum)
ASTCMDLIST(sync)
-XPG4CMDLIST(tail)
-BINCMDLIST(tail)
+BINCMDLIST(sync)
+GNUCMDLIST(sync)
+SBINCMDLIST(sync)
+SUSRBINCMDLIST(sync)
ASTCMDLIST(tail)
-BINCMDLIST(tee)
+BINCMDLIST(tail)
+XPG4CMDLIST(tail)
ASTCMDLIST(tee)
-BINCMDLIST(tty)
+BINCMDLIST(tee)
+GNUCMDLIST(tee)
ASTCMDLIST(tty)
+BINCMDLIST(tty)
+GNUCMDLIST(tty)
ASTCMDLIST(uname)
-BINCMDLIST(uniq)
ASTCMDLIST(uniq)
-BINCMDLIST(wc)
+BINCMDLIST(uniq)
+GNUCMDLIST(uniq)
ASTCMDLIST(wc)
+BINCMDLIST(wc)
+GNUCMDLIST(wc)
ASTCMDLIST(xgrep)
+BINCMDLIST(xgrep)
/* Mandatory for ksh93 test suite and AST scripts */
BINCMDLIST(getconf)
diff --git a/usr/src/lib/libshell/common/data/strdata.c b/usr/src/lib/libshell/common/data/strdata.c
index 4642c2826b..05a88b095c 100644
--- a/usr/src/lib/libshell/common/data/strdata.c
+++ b/usr/src/lib/libshell/common/data/strdata.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/testops.c b/usr/src/lib/libshell/common/data/testops.c
index 230ec4cbf8..a85f2ef46c 100644
--- a/usr/src/lib/libshell/common/data/testops.c
+++ b/usr/src/lib/libshell/common/data/testops.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/data/variables.c b/usr/src/lib/libshell/common/data/variables.c
index bb8d7441fe..ba44b5cd87 100644
--- a/usr/src/lib/libshell/common/data/variables.c
+++ b/usr/src/lib/libshell/common/data/variables.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/completion.c b/usr/src/lib/libshell/common/edit/completion.c
index f90f7af9c6..4c1b044942 100644
--- a/usr/src/lib/libshell/common/edit/completion.c
+++ b/usr/src/lib/libshell/common/edit/completion.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/edit.c b/usr/src/lib/libshell/common/edit/edit.c
index 7fe6a99c47..7dab2368d6 100644
--- a/usr/src/lib/libshell/common/edit/edit.c
+++ b/usr/src/lib/libshell/common/edit/edit.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/emacs.c b/usr/src/lib/libshell/common/edit/emacs.c
index 8faf4c7856..7a3c39e951 100644
--- a/usr/src/lib/libshell/common/edit/emacs.c
+++ b/usr/src/lib/libshell/common/edit/emacs.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/hexpand.c b/usr/src/lib/libshell/common/edit/hexpand.c
index 497f8170d5..c796334ec6 100644
--- a/usr/src/lib/libshell/common/edit/hexpand.c
+++ b/usr/src/lib/libshell/common/edit/hexpand.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/history.c b/usr/src/lib/libshell/common/edit/history.c
index b0a3c8db27..4cc7c01a21 100644
--- a/usr/src/lib/libshell/common/edit/history.c
+++ b/usr/src/lib/libshell/common/edit/history.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/edit/vi.c b/usr/src/lib/libshell/common/edit/vi.c
index b374aa4b0d..2365c16ff5 100644
--- a/usr/src/lib/libshell/common/edit/vi.c
+++ b/usr/src/lib/libshell/common/edit/vi.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/features/externs b/usr/src/lib/libshell/common/features/externs
index 7d5e48d7c7..bc267591d8 100644
--- a/usr/src/lib/libshell/common/features/externs
+++ b/usr/src/lib/libshell/common/features/externs
@@ -1,9 +1,10 @@
set prototyped
hdr nc,exec_attr
mem exception.name,_exception.name math.h
-lib setreuid,setregid,nice,sigflag,fork,spawnveg,fchdir
+lib setreuid,setregid,nice,fork,spawnveg,fchdir
lib pathnative,pathposix,uwin_path,uwin_unpath,fts_notify
lib memcntl sys/mman.h
+lib getexecuser,free_execattr exec_attr.h -lsecdb
reference unistd.h
diff --git a/usr/src/lib/libshell/common/features/math.sh b/usr/src/lib/libshell/common/features/math.sh
index 5d7a498921..b06fcefbb2 100644
--- a/usr/src/lib/libshell/common/features/math.sh
+++ b/usr/src/lib/libshell/common/features/math.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/features/rlimits b/usr/src/lib/libshell/common/features/rlimits
index a9e4294ed1..f2ffe192cf 100644
--- a/usr/src/lib/libshell/common/features/rlimits
+++ b/usr/src/lib/libshell/common/features/rlimits
@@ -1,3 +1,3 @@
hdr,sys resource,vlimit
lib getrlimit,ulimit,vlimit
-typ rlim_t sys/resource.h
+typ rlim_t sys/types.h sys/resource.h
diff --git a/usr/src/lib/libshell/common/include/argnod.h b/usr/src/lib/libshell/common/include/argnod.h
index 524cc49d61..e568efca63 100644
--- a/usr/src/lib/libshell/common/include/argnod.h
+++ b/usr/src/lib/libshell/common/include/argnod.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/builtins.h b/usr/src/lib/libshell/common/include/builtins.h
index 900bc35937..510f8e2330 100644
--- a/usr/src/lib/libshell/common/include/builtins.h
+++ b/usr/src/lib/libshell/common/include/builtins.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/defs.h b/usr/src/lib/libshell/common/include/defs.h
index 57c39b6dec..4520e31988 100644
--- a/usr/src/lib/libshell/common/include/defs.h
+++ b/usr/src/lib/libshell/common/include/defs.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -31,6 +31,7 @@
#include <ast.h>
#include <sfio.h>
#include <error.h>
+#include "FEATURE/externs"
#include "FEATURE/options"
#include <cdt.h>
#include <history.h>
@@ -57,6 +58,9 @@
# define env_delete(e,p) env_change()
#endif
+extern char* sh_getenv(const char*);
+extern char* sh_setenviron(const char*);
+
/*
* note that the first few fields have to be the same as for
* Shscoped_t in <shell.h>
@@ -170,6 +174,8 @@ struct limits
unsigned char lastsig; /* last signal received */ \
char subshare; /* set when in ${..} comsub */ \
char toomany; /* set when out of fd's */ \
+ char instance; /* in set_instance */ \
+ char decomma; /* decimal_point=',' */ \
char *readscript; /* set before reading a script */ \
int *inpipe; /* input pipe pointer */ \
int *outpipe; /* output pipe pointer */ \
@@ -337,6 +343,10 @@ struct limits
# define PIPE_BUF 512
#endif
+#if SHOPT_PFSH && ( !_lib_getexecuser || !_lib_free_execattr )
+# undef SHOPT_PFSH
+#endif
+
#define MATCH_MAX 64
#define SH_READEVAL 0x4000 /* for sh_eval */
diff --git a/usr/src/lib/libshell/common/include/edit.h b/usr/src/lib/libshell/common/include/edit.h
index 3e8fe73f8d..122c700e37 100644
--- a/usr/src/lib/libshell/common/include/edit.h
+++ b/usr/src/lib/libshell/common/include/edit.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/env.h b/usr/src/lib/libshell/common/include/env.h
index c8b30a2c68..e8317ad736 100644
--- a/usr/src/lib/libshell/common/include/env.h
+++ b/usr/src/lib/libshell/common/include/env.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/fault.h b/usr/src/lib/libshell/common/include/fault.h
index 97a4280b0d..97973b40bb 100644
--- a/usr/src/lib/libshell/common/include/fault.h
+++ b/usr/src/lib/libshell/common/include/fault.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/fcin.h b/usr/src/lib/libshell/common/include/fcin.h
index 310cc6693c..4923dc0737 100644
--- a/usr/src/lib/libshell/common/include/fcin.h
+++ b/usr/src/lib/libshell/common/include/fcin.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/history.h b/usr/src/lib/libshell/common/include/history.h
index 40351707f9..6faedafa07 100644
--- a/usr/src/lib/libshell/common/include/history.h
+++ b/usr/src/lib/libshell/common/include/history.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/io.h b/usr/src/lib/libshell/common/include/io.h
index bd2a8bdb87..8ba4e0ecd4 100644
--- a/usr/src/lib/libshell/common/include/io.h
+++ b/usr/src/lib/libshell/common/include/io.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/jobs.h b/usr/src/lib/libshell/common/include/jobs.h
index 513667e1ab..4ed087f0a7 100644
--- a/usr/src/lib/libshell/common/include/jobs.h
+++ b/usr/src/lib/libshell/common/include/jobs.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/lexstates.h b/usr/src/lib/libshell/common/include/lexstates.h
index e3f75446e4..c117988d9c 100644
--- a/usr/src/lib/libshell/common/include/lexstates.h
+++ b/usr/src/lib/libshell/common/include/lexstates.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/name.h b/usr/src/lib/libshell/common/include/name.h
index 80d970055c..cf46c92b5f 100644
--- a/usr/src/lib/libshell/common/include/name.h
+++ b/usr/src/lib/libshell/common/include/name.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -156,7 +156,8 @@ struct Ufunction
#define nv_setsize(n,s) ((n)->nvsize = (s))
#undef nv_size
#define nv_size(np) ((np)->nvsize)
-#define nv_isnull(np) (!(np)->nvalue.cp && !((np)->nvfun && (np)->nvfun->disc) && nv_isattr(np,NV_SHORT|NV_INTEGER)!=(NV_SHORT|NV_INTEGER))
+#define _nv_hasget(np) ((np)->nvfun && (np)->nvfun->disc && nv_hasget(np))
+#define nv_isnull(np) (!(np)->nvalue.cp && (nv_isattr(np,NV_SHORT|NV_INTEGER)!=(NV_SHORT|NV_INTEGER)) && !_nv_hasget(np))
/* ... for arrays */
@@ -179,6 +180,7 @@ extern void nv_optimize(Namval_t*);
extern void nv_outname(Sfio_t*,char*, int);
extern void nv_unref(Namval_t*);
extern void _nv_unset(Namval_t*,int);
+extern int nv_hasget(Namval_t*);
extern int nv_clone(Namval_t*, Namval_t*, int);
void clone_all_disc(Namval_t*, Namval_t*, int);
extern Namfun_t *nv_clone_disc(Namfun_t*, int);
diff --git a/usr/src/lib/libshell/common/include/national.h b/usr/src/lib/libshell/common/include/national.h
index 41fe6e5316..94221a2c95 100644
--- a/usr/src/lib/libshell/common/include/national.h
+++ b/usr/src/lib/libshell/common/include/national.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/nval.h b/usr/src/lib/libshell/common/include/nval.h
index 2a4c61f0ac..d4eb243c42 100644
--- a/usr/src/lib/libshell/common/include/nval.h
+++ b/usr/src/lib/libshell/common/include/nval.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/path.h b/usr/src/lib/libshell/common/include/path.h
index 39f45e8883..9c656adf92 100644
--- a/usr/src/lib/libshell/common/include/path.h
+++ b/usr/src/lib/libshell/common/include/path.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/regress.h b/usr/src/lib/libshell/common/include/regress.h
index e47cc2cf17..487823e8ae 100644
--- a/usr/src/lib/libshell/common/include/regress.h
+++ b/usr/src/lib/libshell/common/include/regress.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/shell.h b/usr/src/lib/libshell/common/include/shell.h
index d649dbf271..2ce315566e 100644
--- a/usr/src/lib/libshell/common/include/shell.h
+++ b/usr/src/lib/libshell/common/include/shell.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/shlex.h b/usr/src/lib/libshell/common/include/shlex.h
index 371e01b001..7da3e90ed6 100644
--- a/usr/src/lib/libshell/common/include/shlex.h
+++ b/usr/src/lib/libshell/common/include/shlex.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/shnodes.h b/usr/src/lib/libshell/common/include/shnodes.h
index 176a0d9e5f..032ef2609d 100644
--- a/usr/src/lib/libshell/common/include/shnodes.h
+++ b/usr/src/lib/libshell/common/include/shnodes.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/shtable.h b/usr/src/lib/libshell/common/include/shtable.h
index f8953f651d..bd237ae895 100644
--- a/usr/src/lib/libshell/common/include/shtable.h
+++ b/usr/src/lib/libshell/common/include/shtable.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/streval.h b/usr/src/lib/libshell/common/include/streval.h
index 001f2d1ea1..32ccbb6824 100644
--- a/usr/src/lib/libshell/common/include/streval.h
+++ b/usr/src/lib/libshell/common/include/streval.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -78,6 +78,7 @@ struct lval
short emode;
short level;
short elen;
+ char nosub;
};
struct mathtab
@@ -159,6 +160,7 @@ typedef struct _arith_
#define A_DOT 52
#define A_LIT 53
#define A_NOTNOT 54
+#define A_ASSIGNOP 55
/* define error messages */
diff --git a/usr/src/lib/libshell/common/include/terminal.h b/usr/src/lib/libshell/common/include/terminal.h
index 7192039013..3974b4b22b 100644
--- a/usr/src/lib/libshell/common/include/terminal.h
+++ b/usr/src/lib/libshell/common/include/terminal.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/test.h b/usr/src/lib/libshell/common/include/test.h
index 1a38632d44..4ef649883a 100644
--- a/usr/src/lib/libshell/common/include/test.h
+++ b/usr/src/lib/libshell/common/include/test.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/timeout.h b/usr/src/lib/libshell/common/include/timeout.h
index 276cf131a1..5f404447a2 100644
--- a/usr/src/lib/libshell/common/include/timeout.h
+++ b/usr/src/lib/libshell/common/include/timeout.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/ulimit.h b/usr/src/lib/libshell/common/include/ulimit.h
index 39fedeed78..a1c36613fd 100644
--- a/usr/src/lib/libshell/common/include/ulimit.h
+++ b/usr/src/lib/libshell/common/include/ulimit.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/variables.h b/usr/src/lib/libshell/common/include/variables.h
index 098e8743aa..5afad98b59 100644
--- a/usr/src/lib/libshell/common/include/variables.h
+++ b/usr/src/lib/libshell/common/include/variables.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/include/version.h b/usr/src/lib/libshell/common/include/version.h
index b22c513e65..7a4a876c06 100644
--- a/usr/src/lib/libshell/common/include/version.h
+++ b/usr/src/lib/libshell/common/include/version.h
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -17,4 +17,4 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
-#define SH_RELEASE "93t+ 2009-10-12"
+#define SH_RELEASE "93t+ 2010-03-05"
diff --git a/usr/src/lib/libshell/common/scripts/cpvprint.sh b/usr/src/lib/libshell/common/scripts/cpvprint.sh
index bcf2daa985..1257d24876 100644
--- a/usr/src/lib/libshell/common/scripts/cpvprint.sh
+++ b/usr/src/lib/libshell/common/scripts/cpvprint.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh b/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh
index bdcecd00cf..bcc6bec0ae 100644
--- a/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh
+++ b/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -697,8 +696,8 @@ function cat_http_body
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
- [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]* ]] &&
- (( chunksize=16#${hexchunksize} )) && (( chunksize > 0 )) ; do
+ [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
+ (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do
dd bs=1 count="${chunksize}" 2>/dev/null
done
else
@@ -764,7 +763,7 @@ function cat_url
# send HTTP request
request="GET /${path} HTTP/1.1\r\n"
request+="Host: ${host}\r\n"
- request+="User-Agent: crawlsrccomments/ksh93(ssl) (2009-05-08; $(uname -s -r -p))\r\n"
+ request+="User-Agent: crawlsrccomments/ksh93(ssl) (2010-03-27; $(uname -s -r -p))\r\n"
request+="Connection: close\r\n"
print -n -- "${request}\r\n" >> "${sslfifo.in}"
@@ -784,7 +783,7 @@ function cat_url
# send HTTP request
request="GET /${path} HTTP/1.1\r\n"
request+="Host: ${host}\r\n"
- request+="User-Agent: crawlsrccomments/ksh93 (2009-05-08; $(uname -s -r -p))\r\n"
+ request+="User-Agent: crawlsrccomments/ksh93 (2010-03-27; $(uname -s -r -p))\r\n"
request+="Connection: close\r\n"
print -n -- "${request}\r\n" >&${netfd}
@@ -1141,8 +1140,9 @@ function usage
}
typeset -r do_getcomments_usage=$'+
-[-?\n@(#)\$Id: getcomments (Roland Mainz) 2009-05-09 \$\n]
+[-?\n@(#)\$Id: getcomments (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@sun.com>]
+[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?getcomments - extract license information from source files]
[+DESCRIPTION?\bgetcomments\b is a small utilty script which extracts
license information from the "\bgetcomments\b"-database
@@ -1164,8 +1164,9 @@ typeset -r do_getcomments_usage=$'+
'
typeset -r do_crawl_usage=$'+
-[-?\n@(#)\$Id: crawl (Roland Mainz) 2009-05-09 \$\n]
+[-?\n@(#)\$Id: crawl (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@sun.com>]
+[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?crawl - crawl comment information from source files]
[+DESCRIPTION?\bcrawl\b is a small utilty script which reads
a list of source code files from stdin, determinates the type of
@@ -1180,8 +1181,9 @@ typeset -r do_crawl_usage=$'+
'
typeset -r crawlsrccomments_usage=$'+
-[-?\n@(#)\$Id: crawlsrccomments (Roland Mainz) 2009-05-09 \$\n]
+[-?\n@(#)\$Id: crawlsrccomments (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@sun.com>]
+[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?crawlsrccomments - extract and filter comment information from source files]
[+DESCRIPTION?\bcrawlsrccomments\b is a small utilty script which reads
a list of source code files from stdin, determinates the type of
diff --git a/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh b/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh
index 1de54a92fc..1d09e4aeb3 100644
--- a/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh
+++ b/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/filetree1.sh b/usr/src/lib/libshell/common/scripts/filetree1.sh
index 243c9758cf..9cbcb0c35d 100644
--- a/usr/src/lib/libshell/common/scripts/filetree1.sh
+++ b/usr/src/lib/libshell/common/scripts/filetree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
diff --git a/usr/src/lib/libshell/common/scripts/gnaw.sh b/usr/src/lib/libshell/common/scripts/gnaw.sh
index 878f2899ac..25445e7a4d 100644
--- a/usr/src/lib/libshell/common/scripts/gnaw.sh
+++ b/usr/src/lib/libshell/common/scripts/gnaw.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh b/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh
index b9ae173df9..082d519abe 100644
--- a/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh
+++ b/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -221,14 +220,17 @@ typeset symbollist=' .:0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR
typeset symbollistlen=$(( ${#symbollist} - 1))
typeset mode="parallel"
-max_mag=400
-stepwidth=0.1
-numcpus=16
+(( max_mag=400 ))
+(( stepwidth=0.1 ))
+
+# calculate number of worker CPUs and use 3 as fallback
+(( numcpus=$(getconf NPROCESSORS_ONLN || print "3") ))
+(( numcpus=numcpus*4 ))
(( m_width=termsize.columns-1 , m_height=termsize.lines-2 ))
typeset -r mandelbrotset1_usage=$'+
-[-?\n@(#)\$Id: mandelbrotset1 (Roland Mainz) 2009-06-14 \$\n]
+[-?\n@(#)\$Id: mandelbrotset1 (Roland Mainz) 2010-03-31 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?mandelbrotset1 - generate mandelbrot set fractals with ksh93]
[+DESCRIPTION?\bmandelbrotset1\b mandelbrot set fractal generator
diff --git a/usr/src/lib/libshell/common/scripts/multifollow.sh b/usr/src/lib/libshell/common/scripts/multifollow.sh
index b5d5cb7bb2..a14d34ee97 100644
--- a/usr/src/lib/libshell/common/scripts/multifollow.sh
+++ b/usr/src/lib/libshell/common/scripts/multifollow.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
diff --git a/usr/src/lib/libshell/common/scripts/numtree1.sh b/usr/src/lib/libshell/common/scripts/numtree1.sh
index beca4aae76..ba7783e91e 100644
--- a/usr/src/lib/libshell/common/scripts/numtree1.sh
+++ b/usr/src/lib/libshell/common/scripts/numtree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -60,10 +59,14 @@ function add_number_to_tree
integer i
typeset nodepath # full name of compound variable
integer -a pe # path elements
+ integer len
+ typeset revnums="$(rev <<<"${num}")"
# first built an array containing the names of each path element
# (e.g. "135" results in an array containing "( 1 3 5 )")
- for (( i=$(rev <<<$num) ; i > 0 ; i=i/10 )) ; do
+ # 10#<number> is used to prevent leading zeros being interpreted
+ # as octals
+ for (( len=${#revnums} , i=$( printf "10#%s\n" "${revnums}" ) ; len > 0 ; len--, i=i/10 )) ; do
pe+=( $((i % 10)) )
done
@@ -72,15 +75,30 @@ function add_number_to_tree
nodepath="${treename}"
for (( i=0 ; i < ${#pe[@]} ; i++ )) ; do
nameref x="${nodepath}"
- [[ ! -v x.node ]] && compound -C -a x.nodes
-
+
+ # [[ -v ]] does not work for arrays because [[ -v ar ]]
+ # is equal to [[ -v ar[0] ]]. In this case we can
+ # use the output of typeset +p x.nodes
+ [[ "${ typeset +p x.nodes ;}" == "" ]] && compound -a x.nodes
+
nodepath+=".nodes[${pe[i]}]"
done
- # insert element
+ # insert element (leaf)
nameref node="${nodepath}"
- [[ ! -v node.elements ]] && integer -a node.elements
+ [[ "${ typeset +p node.elements ;}" == "" ]] && integer -a node.elements
node.elements+=( ${num} )
+
+ # DEBUG only
+ [[ "${!node.elements[*]}" != "" ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${ typeset +p node.elements ;}" == *-a* ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${ typeset +p node.elements ;}" == *-i* ]] || fatal_error "assertion $LINENO FAILED"
+ [[ -v node ]] || fatal_error "assertion $LINENO FAILED"
+ [[ -R node ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${ typeset +p ${!node} ;}" == *-C* ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${!x.nodes[*]}" != "" ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${ typeset +p x.nodes ;}" == *-a* ]] || fatal_error "assertion $LINENO FAILED"
+ [[ "${ typeset +p x.nodes ;}" == *-C* ]] || fatal_error "assertion $LINENO FAILED"
return 0
}
@@ -147,7 +165,7 @@ integer i
typeset progname="${ basename "${0}" ; }"
typeset -r numtree1_usage=$'+
-[-?\n@(#)\$Id: numtree1 (Roland Mainz) 2009-08-17 \$\n]
+[-?\n@(#)\$Id: numtree1 (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?numtree1 - generate sorted variable tree containing numbers]
[+DESCRIPTION?\bnumtree1\b is a simple variable tree generator
diff --git a/usr/src/lib/libshell/common/scripts/primenumbers1.sh b/usr/src/lib/libshell/common/scripts/primenumbers1.sh
index aba6f5aeac..b408eb3049 100644
--- a/usr/src/lib/libshell/common/scripts/primenumbers1.sh
+++ b/usr/src/lib/libshell/common/scripts/primenumbers1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/rssread.sh b/usr/src/lib/libshell/common/scripts/rssread.sh
index 1010a7d873..05e703ac2c 100644
--- a/usr/src/lib/libshell/common/scripts/rssread.sh
+++ b/usr/src/lib/libshell/common/scripts/rssread.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -124,7 +123,7 @@ typeset -T urlconnection_t=(
hexchunksize="${hexchunksize//$'\r'/}"
[[ "${hexchunksize}" != "" ]] || continue
[[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] || break
- (( chunksize=16#${hexchunksize} ))
+ (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) ))
(( chunksize > 0 )) || break
dd bs=1 count="${chunksize}" 2>/dev/null
done
@@ -178,7 +177,7 @@ typeset -T urlconnection_t=(
function open_connection
{
if [[ "${_.protocol}" == "https" ]] ; then
- _.ssl.fifo.dir="$(mktemp -d)"
+ _.ssl.fifo.dir="$(mktemp -t -d)"
_.ssl.fifo.in="${_.ssl.fifo.dir}/in"
_.ssl.fifo.out="${_.ssl.fifo.dir}/out"
@@ -244,7 +243,7 @@ typeset -T urlconnection_t=(
[[ "${_.host}" != "" ]] || { print -u2 -f "%s: host not set.\n" "$0" ; return 1 ; }
[[ "${_.path}" != "" ]] || { print -u2 -f "%s: path not set.\n" "$0" ; return 1 ; }
- _.open_connection
+ _.open_connection || return 1
# send HTTP request
request="GET /${_.path} HTTP/1.1\r\n"
@@ -563,7 +562,7 @@ function do_rssread
set -o errexit
urlconnection_t hc
- hc.user_agent="rssread/ksh93(ssl) (2009-08-14; $(uname -s -r -p))"
+ hc.user_agent="rssread/ksh93(ssl) (2010-03-27; $(uname -s -r -p))"
hc.init_url "$1"
# need extra newline after cat_url to terminate line with $'\n'
@@ -609,12 +608,6 @@ typeset -A bookmark_urls
# "ramdom" urls for testing
bookmark_urls=(
["google_blogs_ksh"]="http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&q=(%22ksh93%22%7C%22ksh+93%22+%7C+%22korn93%22+%7C+%22korn+93%22)&ie=utf-8&num=100&output=rss"
- # OpenSolaris.org sites
- ["ksh93_integration"]="http://www.opensolaris.org/rss/os/project/ksh93-integration/announcements/rss2.xml"
- ["ksh93_integration_ssl"]="https://www.opensolaris.org/rss/os/project/ksh93-integration/announcements/rss2.xml"
- ["shell"]="http://www.opensolaris.org/rss/os/project/shell/announcements/rss2.xml"
- ["systemz"]="http://www.opensolaris.org/rss/os/project/systemz/announcements/rss2.xml"
- ["systemz_ssl"]="https://www.opensolaris.org/rss/os/project/systemz/announcements/rss2.xml"
# some Sun staff/sites
["blogs_sun_com"]="http://blogs.sun.com/main/feed/entries/rss"
["bigadmin"]="http://www.sun.com/bigadmin/content/rss/motd.xml"
@@ -634,7 +627,7 @@ bookmark_urls=(
typeset progname="${ basename "${0}" ; }"
typeset -r rssread_usage=$'+
-[-?\n@(#)\$Id: rssread (Roland Mainz) 2009-08-14 \$\n]
+[-?\n@(#)\$Id: rssread (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@sun.com>]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?rssread - fetch RSS messages and convert them to plain text]
diff --git a/usr/src/lib/libshell/common/scripts/shcalc.sh b/usr/src/lib/libshell/common/scripts/shcalc.sh
index db7149a0bd..50c9317ad4 100644
--- a/usr/src/lib/libshell/common/scripts/shcalc.sh
+++ b/usr/src/lib/libshell/common/scripts/shcalc.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/shircbot.sh b/usr/src/lib/libshell/common/scripts/shircbot.sh
index 3c99355222..82903c53b1 100644
--- a/usr/src/lib/libshell/common/scripts/shircbot.sh
+++ b/usr/src/lib/libshell/common/scripts/shircbot.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/shlint.sh b/usr/src/lib/libshell/common/scripts/shlint.sh
index aea60a4951..7b6b609ac8 100644
--- a/usr/src/lib/libshell/common/scripts/shlint.sh
+++ b/usr/src/lib/libshell/common/scripts/shlint.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/shman.sh b/usr/src/lib/libshell/common/scripts/shman.sh
index 56c2e42c12..1044d6a1bb 100644
--- a/usr/src/lib/libshell/common/scripts/shman.sh
+++ b/usr/src/lib/libshell/common/scripts/shman.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -150,7 +149,7 @@ function browse_manpage
# use "cat" here to avoid that "less" may try funny things
cat <"${doc_filename}" | less -I -M $"--prompt=MManual\ page\ ${doc_title}\ ?ltline\ %lt?L/%L.:"
else
- tmpdirname="$(mktemp -d "/tmp/shman_${PPID}_$$_XXXXXX")"
+ tmpdirname="$(mktemp -t -d "shman_${PPID}_$$_XXXXXX")"
mkdir -p "${tmpdirname}" || { print -u2 -f $"Couldn't create tmp. dir %s\n" "${tmpdirname}" ; return 1 ; }
@@ -320,7 +319,7 @@ builtin date
typeset progname="$(basename "${0}")"
typeset -r man_usage=$'+
-[-?\n@(#)\$Id: shman (Roland Mainz) 2009-06-26 \$\n]
+[-?\n@(#)\$Id: shman (Roland Mainz) 2009-12-02 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[-author?Roland Mainz <roland.mainz@sun.com>]
[+NAME?man - find and display reference manual pages]
diff --git a/usr/src/lib/libshell/common/scripts/shnote.sh b/usr/src/lib/libshell/common/scripts/shnote.sh
index b449f257c0..217fc7daae 100644
--- a/usr/src/lib/libshell/common/scripts/shnote.sh
+++ b/usr/src/lib/libshell/common/scripts/shnote.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -125,8 +124,8 @@ function cat_http_body
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
- [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]* ]] &&
- (( chunksize=16#${hexchunksize} )) && (( chunksize > 0 )) ; do
+ [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
+ (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do
dd bs=1 count="${chunksize}" 2>/dev/null
done
else
@@ -359,14 +358,14 @@ builtin uname
typeset progname="${ basename "${0}" ; }"
# HTTP protocol client identifer
-typeset -r http_user_agent="shnote/ksh93 (2009-05-09; $(uname -s -r -p))"
+typeset -r http_user_agent="shnote/ksh93 (2010-03-27; $(uname -s -r -p))"
# name of history log (the number after "history" is some kind of version
# counter to handle incompatible changes to the history file format)
typeset -r history_file="${HOME}/.shnote/history0.txt"
typeset -r shnote_usage=$'+
-[-?\n@(#)\$Id: shnote (Roland Mainz) 2009-05-09 \$\n]
+[-?\n@(#)\$Id: shnote (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?shnote - read/write text data to internet clipboards]
[+DESCRIPTION?\bshnote\b is a small utilty which can read and write text
diff --git a/usr/src/lib/libshell/common/scripts/shpiano.sh b/usr/src/lib/libshell/common/scripts/shpiano.sh
index e20813a75a..b6d511a6ba 100644
--- a/usr/src/lib/libshell/common/scripts/shpiano.sh
+++ b/usr/src/lib/libshell/common/scripts/shpiano.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
diff --git a/usr/src/lib/libshell/common/scripts/shtinyurl.sh b/usr/src/lib/libshell/common/scripts/shtinyurl.sh
index fb18627081..debd28949b 100644
--- a/usr/src/lib/libshell/common/scripts/shtinyurl.sh
+++ b/usr/src/lib/libshell/common/scripts/shtinyurl.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -93,8 +92,8 @@ function cat_http_body
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
- [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]* ]] &&
- (( chunksize=16#${hexchunksize} )) && (( chunksize > 0 )) ; do
+ [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
+ (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do
dd bs=1 count="${chunksize}" 2>/dev/null
done
else
@@ -213,10 +212,10 @@ builtin uname
typeset progname="${ basename "${0}" ; }"
# HTTP protocol client identifer
-typeset -r http_user_agent="shtinyurl/ksh93 (2009-08-12; ${ uname -s -r -p ; })"
+typeset -r http_user_agent="shtinyurl/ksh93 (2010-03-27; ${ uname -s -r -p ; })"
typeset -r shtinyurl_usage=$'+
-[-?\n@(#)\$Id: shtinyurl (Roland Mainz) 2009-08-12 \$\n]
+[-?\n@(#)\$Id: shtinyurl (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?shtinyurl - create short alias URL from long URL]
[+DESCRIPTION?\bshtinyurl\b is a small utility which passes a given URL
diff --git a/usr/src/lib/libshell/common/scripts/shtwitter.sh b/usr/src/lib/libshell/common/scripts/shtwitter.sh
index c7672dde6c..217b821e6a 100644
--- a/usr/src/lib/libshell/common/scripts/shtwitter.sh
+++ b/usr/src/lib/libshell/common/scripts/shtwitter.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -147,8 +146,8 @@ function cat_http_body
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
- [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]* ]] &&
- (( chunksize=16#${hexchunksize} )) && (( chunksize > 0 )) ; do
+ [[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
+ (( chunksize=$( printf "16#%s\n" "${hexchunksize}" ) )) && (( chunksize > 0 )) ; do
dd bs=1 count="${chunksize}" 2>/dev/null
done
else
@@ -313,10 +312,10 @@ builtin uname
typeset progname="${ basename "${0}" ; }"
# HTTP protocol client identifer
-typeset -r http_user_agent="shtwitter/ksh93 (2009-06-15; ${ uname -s -r -p ; })"
+typeset -r http_user_agent="shtwitter/ksh93 (2010-03-27; ${ uname -s -r -p ; })"
typeset -r shtwitter_usage=$'+
-[-?\n@(#)\$Id: shtwitter (Roland Mainz) 2009-06-15 \$\n]
+[-?\n@(#)\$Id: shtwitter (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?shtwitter - read/write text data to internet clipboards]
[+DESCRIPTION?\bshtwitter\b is a small utility which can read and write text
diff --git a/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh b/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh
index 95a36063dc..a7bc41097e 100644
--- a/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh
+++ b/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -69,14 +68,18 @@ function add_file_to_tree
nodepath="${treename}"
for (( i=0 ; i < (${#pe[@]}-1) ; i++ )) ; do
nameref x="${nodepath}"
- [[ ! -v x.node ]] && compound -A x.nodes
+
+ # [[ -v ]] does not work for arrays because [[ -v ar ]]
+ # is equal to [[ -v ar[0] ]]. In this case we can
+ # use the output of typeset +p x.nodes
+ [[ "${ typeset +p x.nodes ; }" == "" ]] && compound -A x.nodes
nodepath+=".nodes[${pe[i]}]"
done
# insert element
nameref node="${nodepath}"
- [[ ! -v node.elements ]] && compound -A node.elements
+ [[ "${ typeset +p node.elements ; }" == "" ]] && compound -A node.elements
node.elements[${pe[i]}]=(
filepath="${filename}"
)
@@ -146,7 +149,7 @@ integer i
typeset progname="${ basename "${0}" ; }"
typeset -r simplefileattributetree1_usage=$'+
-[-?\n@(#)\$Id: simplefileattributetree1 (Roland Mainz) 2009-06-26 \$\n]
+[-?\n@(#)\$Id: simplefileattributetree1 (Roland Mainz) 2010-03-27 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?simplefileattributetree1 - generate compound variable tree which contains file names and their attributes]
[+DESCRIPTION?\bsimplefileattributetree1\b is a simple variable tree
diff --git a/usr/src/lib/libshell/common/scripts/simplefiletree1.sh b/usr/src/lib/libshell/common/scripts/simplefiletree1.sh
index 5b79aae8f8..d2308394cf 100644
--- a/usr/src/lib/libshell/common/scripts/simplefiletree1.sh
+++ b/usr/src/lib/libshell/common/scripts/simplefiletree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -68,14 +67,18 @@ function add_file_to_tree
nodepath="${treename}"
for (( i=0 ; i < (${#pe[@]}-1) ; i++ )) ; do
nameref x="${nodepath}"
- [[ ! -v x.node ]] && compound -A x.nodes
+
+ # [[ -v ]] does not work for arrays because [[ -v ar ]]
+ # is equal to [[ -v ar[0] ]]. In this case we can
+ # use the output of typeset +p x.nodes
+ [[ "${ typeset +p x.nodes ; }" == "" ]] && compound -A x.nodes
nodepath+=".nodes[${pe[i]}]"
done
# insert element
nameref node="${nodepath}"
- [[ ! -v node.elements ]] && typeset -a node.elements
+ [[ "${ typeset +p node.elements ; }" == "" ]] && typeset -a node.elements
node.elements+=( "${pe[i]}" )
return 0
diff --git a/usr/src/lib/libshell/common/scripts/svcproptree1.sh b/usr/src/lib/libshell/common/scripts/svcproptree1.sh
index d3f1ee9742..60974a361f 100644
--- a/usr/src/lib/libshell/common/scripts/svcproptree1.sh
+++ b/usr/src/lib/libshell/common/scripts/svcproptree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
@@ -74,9 +73,7 @@ function svcproptovartree
servicename="${servicename/~(El)svc:\//}" # strip "svc:/"
propname="${name#~(El).*:properties/}"
- if [[ "$(typeset -p "tree[${servicename}].properties")" == "" ]] ; then
- compound -A tree[${servicename}].properties
- fi
+ [[ "${ typeset +p "tree[${servicename}].properties" ; }" == "" ]] && compound -A tree[${servicename}].properties
nameref node=tree[${servicename}].properties[${propname}]
@@ -110,7 +107,7 @@ builtin uname
typeset progname="${ basename "${0}" ; }"
typeset -r svcproptree1_usage=$'+
-[-?\n@(#)\$Id: svcproptree1 (Roland Mainz) 2009-06-26 \$\n]
+[-?\n@(#)\$Id: svcproptree1 (Roland Mainz) 2010-04-02 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[+NAME?svcproptree1 - SMF tree demo]
[+DESCRIPTION?\bsvcproptree1\b is a small ksh93 compound variable demo
diff --git a/usr/src/lib/libshell/common/scripts/termclock.sh b/usr/src/lib/libshell/common/scripts/termclock.sh
index 582e70ad62..c1c4cb8092 100644
--- a/usr/src/lib/libshell/common/scripts/termclock.sh
+++ b/usr/src/lib/libshell/common/scripts/termclock.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -268,7 +267,7 @@ hours.length=50 hours.scale=12 hours.ch=$"h"
float update_interval=0.9
typeset -r termclock_usage=$'+
-[-?\n@(#)\$Id: termclock (Roland Mainz) 2009-05-09 \$\n]
+[-?\n@(#)\$Id: termclock (Roland Mainz) 2009-12-02 \$\n]
[-author?Roland Mainz <roland.mainz@nrubsig.org>]
[-author?David Korn <dgk@research.att.com>]
[+NAME?termclock - analog clock for terminals]
@@ -295,7 +294,7 @@ which tput >/dev/null || fatal_error $"tput not found."
# create temporary file for double-buffering and register an EXIT trap
# to remove this file when the shell interpreter exits
-scratchfile="${ mktemp "/tmp/termclock.ppid${PPID}_pid$$.XXXXXX" ; }"
+scratchfile="${ mktemp -t "termclock.ppid${PPID}_pid$$.XXXXXX" ; }"
[[ "${scratchfile}" != "" ]] || fatal_error $"Could not create temporary file name."
trap 'rm -f "${scratchfile}"' EXIT
rm -f "${scratchfile}" ; redirect 6<> "${scratchfile}" || fatal_error $"Could not create temporary file."
diff --git a/usr/src/lib/libshell/common/scripts/test_net_sctp.sh b/usr/src/lib/libshell/common/scripts/test_net_sctp.sh
index 92b805f2dd..97de72a9c6 100644
--- a/usr/src/lib/libshell/common/scripts/test_net_sctp.sh
+++ b/usr/src/lib/libshell/common/scripts/test_net_sctp.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
diff --git a/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh b/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh
index 9bb25b855a..fe7783b21c 100644
--- a/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh
+++ b/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh
@@ -22,8 +22,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Solaris needs /usr/xpg6/bin:/usr/xpg4/bin because the tools in /usr/bin are not POSIX-conformant
diff --git a/usr/src/lib/libshell/common/sh.1 b/usr/src/lib/libshell/common/sh.1
index 365b11fd5c..cf40299f82 100644
--- a/usr/src/lib/libshell/common/sh.1
+++ b/usr/src/lib/libshell/common/sh.1
@@ -1023,7 +1023,7 @@ subscripts must be in the
range of
0 through 4,194,303.
A negative subscript is treated as an offset from the maximum
-current index +1 so that -1 refers to the last element.
+current index +1 so that \-1 refers to the last element.
Indexed arrays can be declared with the
.B \-a
option to
@@ -5684,7 +5684,7 @@ for usage and description.
.TP
\(dg\(dg \f3enum\fP \*(OK \f3\-i\fP \*(CK \f2type\^\fP\*(OK=(\f2value\^\fP .\|.\|.) \*(CK
Creates a declaration command named \f2type\^\fP that is an
-integer type that allows one of the specifed \f2value\fPs as
+integer type that allows one of the specified \f2value\fPs as
enumeration names. If \f3=(\fP\f2value\^\ .\|.\|.\|\fP\f3)\fP is
omitted, then \f2type\^\fP must be an indexed array variable with at
least two elements and the values are taken from this array variable.
@@ -7768,37 +7768,29 @@ then the line number is also printed in square brackets
.RB ( "[]" )
after the command or function name.
.SH FILES
-/etc/profile
+.TP
+.B /etc/profile
The system wide initialization file, executed for login shells.
-.RE
.if \nZ=2 \{.br
-/etc/ksh.kshrc
-.RS
+.TP
+.B /etc/ksh.kshrc
The system wide startup file, executed for interactive shells.
-.RE\}
-.br
-\s-1$HOME\s+1/\f3.\fPprofile
-.RS
+\}
+.TP
+.B \s-1$HOME\s+1/\f3.\fPprofile
The personal initialization file, executed for login shells after /etc/profile.
-.RE
-.br
+.TP
\s-1$HOME\s+1/\f3.\fP.kshrc
-.RS
Default personal initialization file, executed for interactive shells when
.SM
.B ENV
is not set.
-.RE
-.br
-/etc/suid_profile
-.RS
+.TP
+.B /etc/suid_profile
Alternative initialization file, executed when instead of personal initialization file when the real and effective user or group id do not match.
-.RE
-.br
-/dev/null
-.RS
+.TP
+.B /dev/null
NULL device
-.RE
.SH SEE ALSO
cat(1),
cd(1),
diff --git a/usr/src/lib/libshell/common/sh/args.c b/usr/src/lib/libshell/common/sh/args.c
index d70e58c048..32afeefa9e 100644
--- a/usr/src/lib/libshell/common/sh/args.c
+++ b/usr/src/lib/libshell/common/sh/args.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/arith.c b/usr/src/lib/libshell/common/sh/arith.c
index bb17fc936d..684670aae6 100644
--- a/usr/src/lib/libshell/common/sh/arith.c
+++ b/usr/src/lib/libshell/common/sh/arith.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -58,14 +58,15 @@ static Namval_t FunNode =
static Namval_t *scope(Shell_t *shp,register Namval_t *np,register struct lval *lvalue,int assign)
{
- register Namarr_t *ap;
register int flag = lvalue->flag;
register char *sub=0, *cp=(char*)np;
register Namval_t *mp;
int flags = HASH_NOSCOPE|HASH_SCOPE|HASH_BUCKET;
+ int nosub = lvalue->nosub;
Dt_t *sdict = (shp->st.real_fun? shp->st.real_fun->sdict:0);
Dt_t *root = shp->var_tree;
assign = assign?NV_ASSIGN:NV_NOASSIGN;
+ lvalue->nosub = 0;
if(cp>=lvalue->expr && cp < lvalue->expr+lvalue->elen)
{
int offset;
@@ -100,7 +101,7 @@ static Namval_t *scope(Shell_t *shp,register Namval_t *np,register struct lval *
}
np = mp;
}
- if(flag || sub)
+ if(!nosub && (flag || sub))
{
if(!sub)
sub = (char*)&lvalue->expr[flag];
@@ -123,6 +124,7 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
np = scope(shp,np,lvalue,1);
nv_putval(np, (char*)&n, NV_LDOUBLE);
r=nv_getnum(np);
+ lvalue->value = (char*)np;
break;
}
case LOOKUP:
diff --git a/usr/src/lib/libshell/common/sh/array.c b/usr/src/lib/libshell/common/sh/array.c
index 0346b9fb59..795d434eda 100644
--- a/usr/src/lib/libshell/common/sh/array.c
+++ b/usr/src/lib/libshell/common/sh/array.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -286,8 +286,9 @@ static Namval_t *array_find(Namval_t *np,Namarr_t *arp, int flag)
np->nvalue.cp = up->cp;
if(!up->cp)
{
+ char *xp = nv_setdisc(np,"get",np,(Namfun_t*)np);
if(flag!=ARRAY_ASSIGN)
- return(0);
+ return(xp && xp!=(char*)np?np:0);
if(!array_covered(np,ap))
ap->header.nelem++;
}
@@ -922,9 +923,10 @@ int nv_nextsub(Namval_t *np)
if(array_isbit(aq->bits, dot,ARRAY_CHILD))
{
Namval_t *mp = aq->val[dot].np;
- if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp))
+ if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp) && !mp->nvfun->dsize)
continue;
- nv_putsub(mp,NIL(char*),ARRAY_UNDEF);
+ if(nv_isarray(mp))
+ nv_putsub(mp,NIL(char*),ARRAY_UNDEF);
}
return(1);
}
@@ -1255,7 +1257,12 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
return((void*)ap->cur);
case NV_ANAME:
if(ap->cur)
+ {
+ Shell_t *shp = sh_getinterp();
+ if(!shp->instance && nv_isnull(ap->cur))
+ return(NIL(void*));
return((void*)ap->cur->nvname);
+ }
return(NIL(void*));
default:
if(sp)
@@ -1269,7 +1276,7 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
mode = NV_ADD|HASH_NOSCOPE;
else if(ap->header.nelem&ARRAY_NOSCOPE)
mode = HASH_NOSCOPE;
- if(*sp==0 && (mode&NV_ADD))
+ if(*sp==0 && sh_isoption(SH_XTRACE) && (mode&NV_ADD))
errormsg(SH_DICT,ERROR_warn(0),"adding empty subscript");
if(sh.subshell && (mp=nv_search(sp,ap->header.table,0)) && nv_isnull(mp))
ap->cur = mp;
@@ -1297,6 +1304,8 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
ap->pos = mp = (Namval_t*)dtprev(ap->header.table,&fake);
ap->nextpos = (Namval_t*)dtnext(ap->header.table,mp);
}
+ else if(!mp && *sp && mode==0)
+ mp = nv_search(sp,ap->header.table,NV_ADD);
np = mp;
if(ap->pos && ap->pos==np)
ap->header.nelem |= ARRAY_SCAN;
diff --git a/usr/src/lib/libshell/common/sh/bash.c b/usr/src/lib/libshell/common/sh/bash.c
index 41945b4d53..5b4bdc4ae5 100644
--- a/usr/src/lib/libshell/common/sh/bash.c
+++ b/usr/src/lib/libshell/common/sh/bash.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/defs.c b/usr/src/lib/libshell/common/sh/defs.c
index b535ac2bce..69895c6778 100644
--- a/usr/src/lib/libshell/common/sh/defs.c
+++ b/usr/src/lib/libshell/common/sh/defs.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/deparse.c b/usr/src/lib/libshell/common/sh/deparse.c
index 88b135262d..4526a84550 100644
--- a/usr/src/lib/libshell/common/sh/deparse.c
+++ b/usr/src/lib/libshell/common/sh/deparse.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/env.c b/usr/src/lib/libshell/common/sh/env.c
index 0e007ce796..d6db6851e7 100644
--- a/usr/src/lib/libshell/common/sh/env.c
+++ b/usr/src/lib/libshell/common/sh/env.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/expand.c b/usr/src/lib/libshell/common/sh/expand.c
index 49862d75cb..675e00ba34 100644
--- a/usr/src/lib/libshell/common/sh/expand.c
+++ b/usr/src/lib/libshell/common/sh/expand.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/fault.c b/usr/src/lib/libshell/common/sh/fault.c
index fc90ad573e..e7bb6f9fad 100644
--- a/usr/src/lib/libshell/common/sh/fault.c
+++ b/usr/src/lib/libshell/common/sh/fault.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -362,7 +362,8 @@ void sh_sigclear(register int sig)
flag &= ~(SH_SIGTRAP|SH_SIGSET);
if(trap=sh.st.trapcom[sig])
{
- free(trap);
+ if(!sh.subshell)
+ free(trap);
sh.st.trapcom[sig]=0;
}
sh.sigflag[sig] = flag;
@@ -404,11 +405,13 @@ void sh_chktrap(void)
#ifdef SHOPT_BGX
if((sh.sigflag[SIGCHLD]&SH_SIGTRAP) && sh.st.trapcom[SIGCHLD])
job_chldtrap(&sh,sh.st.trapcom[SIGCHLD],1);
- while(--sig>=0 && sig!=SIGCHLD)
-#else
- while(--sig>=0)
#endif /* SHOPT_BGX */
+ while(--sig>=0)
{
+#ifdef SHOPT_BGX
+ if(sig==SIGCHLD)
+ continue;
+#endif /* SHOPT_BGX */
if(sh.sigflag[sig]&SH_SIGTRAP)
{
sh.sigflag[sig] &= ~SH_SIGTRAP;
@@ -437,9 +440,11 @@ int sh_trap(const char *trap, int mode)
int was_verbose = sh_isstate(SH_VERBOSE);
int staktop = staktell();
char *savptr = stakfreeze(0);
+ char ifstable[256];
struct checkpt buff;
Fcin_t savefc;
fcsave(&savefc);
+ memcpy(ifstable,shp->ifstable,sizeof(ifstable));
sh_offstate(SH_HISTORY);
sh_offstate(SH_VERBOSE);
shp->intrap++;
@@ -477,6 +482,7 @@ int sh_trap(const char *trap, int mode)
shp->exitval=savxit;
stakset(savptr,staktop);
fcrestore(&savefc);
+ memcpy(shp->ifstable,ifstable,sizeof(ifstable));
if(was_history)
sh_onstate(SH_HISTORY);
if(was_verbose)
diff --git a/usr/src/lib/libshell/common/sh/fcin.c b/usr/src/lib/libshell/common/sh/fcin.c
index 0fd7e7cd70..a340f43339 100644
--- a/usr/src/lib/libshell/common/sh/fcin.c
+++ b/usr/src/lib/libshell/common/sh/fcin.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -186,7 +186,7 @@ int fcmbstate(const char *state, int *s, int *len)
case -1:
if(_Fcin._fcfile && (n=(_Fcin.fclast-_Fcin.fcptr)) < MB_LEN_MAX)
{
- memcmp(extra.buff, _Fcin.fcptr, n);
+ memcpy(extra.buff, _Fcin.fcptr, n);
_Fcin.fcptr = _Fcin.fclast;
for(i=n; i < MB_LEN_MAX+n; i++)
{
diff --git a/usr/src/lib/libshell/common/sh/init.c b/usr/src/lib/libshell/common/sh/init.c
index 7371b8de98..97f060ae27 100644
--- a/usr/src/lib/libshell/common/sh/init.c
+++ b/usr/src/lib/libshell/common/sh/init.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -360,12 +360,8 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
{
Shell_t *shp = nv_shell(np);
int type;
- char *lc_all = nv_getval(LCALLNOD);
+ char *cp;
char *name = nv_name(np);
- if((shp->test&1) && !val && !nv_getval(np))
- return;
- if(shp->test&2)
- nv_putv(np, val, flags, fp);
if(name==(LCALLNOD)->nvname)
type = LC_ALL;
else if(name==(LCTYPENOD)->nvname)
@@ -381,25 +377,32 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
type = LC_LANG;
#else
#define LC_LANG LC_ALL
- else if(name==(LANGNOD)->nvname && (!lc_all || !*lc_all))
+ else if(name==(LANGNOD)->nvname && (!(cp=nv_getval(LCALLNOD)) || !*cp))
type = LC_LANG;
#endif
else
type= -1;
- if(sh_isstate(SH_INIT) && type>=0 && type!=LC_ALL && lc_all && *lc_all)
- type= -1;
- if(type>=0 || type==LC_ALL || type==LC_LANG)
+ if(!sh_isstate(SH_INIT) && (type>=0 || type==LC_ALL || type==LC_LANG))
{
- if(!setlocale(type,val?val:"-") && val)
+ struct lconv* lc;
+ char* r;
+#ifdef AST_LC_setenv
+ ast.locale.set |= AST_LC_setenv;
+#endif
+ r = setlocale(type,val?val:"");
+#ifdef AST_LC_setenv
+ ast.locale.set ^= AST_LC_setenv;
+#endif
+ if(!r && val)
{
if(!sh_isstate(SH_INIT) || shp->login_sh==0)
errormsg(SH_DICT,0,e_badlocale,val);
return;
}
+ shp->decomma = (lc=localeconv()) && lc->decimal_point && *lc->decimal_point==',';
}
- if(!(shp->test&2))
- nv_putv(np, val, flags, fp);
- if(CC_NATIVE==CC_ASCII && (type==LC_ALL || type==LC_LANG || type==LC_CTYPE))
+ nv_putv(np, val, flags, fp);
+ if(CC_NATIVE!=CC_ASCII && (type==LC_ALL || type==LC_LANG || type==LC_CTYPE))
{
if(sh_lexstates[ST_BEGIN]!=sh_lexrstates[ST_BEGIN])
free((void*)sh_lexstates[ST_BEGIN]);
@@ -1022,6 +1025,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
Shell_t *shp = &sh;
register int n;
int type;
+ long v;
static char *login_files[3];
memfatal();
n = strlen(e_version);
@@ -1107,6 +1111,8 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
shp->lim.arg_max = ARG_MAX;
if(shp->lim.child_max <=0)
shp->lim.child_max = CHILD_MAX;
+ if((v = getconf("PID_MAX")) > 0 && shp->lim.child_max > v)
+ shp->lim.child_max = v;
if(shp->lim.open_max <0)
shp->lim.open_max = OPEN_MAX;
if(shp->lim.open_max > (SHRT_MAX-2))
@@ -1301,8 +1307,8 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
shp->bltindata.shexit = sh_exit;
shp->bltindata.shbltin = sh_addbuiltin;
#if _AST_VERSION >= 20080617L
- shp->bltindata.shgetenv = getenv;
- shp->bltindata.shsetenv = setenviron;
+ shp->bltindata.shgetenv = sh_getenv;
+ shp->bltindata.shsetenv = sh_setenviron;
astintercept(&shp->bltindata,1);
#endif
#if 0
@@ -1732,7 +1738,7 @@ static void env_init(Shell_t *shp)
np->nvenv = cp;
nv_close(np);
}
- else /* swap with fron */
+ else /* swap with front */
{
ep[-1] = environ[shp->nenv];
environ[shp->nenv++] = cp;
@@ -1743,7 +1749,7 @@ static void env_init(Shell_t *shp)
if(next = strchr(++cp,'='))
*next = 0;
np = nv_search(cp+2,shp->var_tree,NV_ADD);
- if(nv_isattr(np,NV_IMPORT|NV_EXPORT))
+ if(np!=SHLVL && nv_isattr(np,NV_IMPORT|NV_EXPORT))
{
int flag = *(unsigned char*)cp-' ';
int size = *(unsigned char*)(cp+1)-' ';
@@ -1774,6 +1780,8 @@ static void env_init(Shell_t *shp)
}
nv_newattr(np,flag|NV_IMPORT|NV_EXPORT,size);
}
+ else
+ cp += 2;
}
}
#ifdef _ENV_H
diff --git a/usr/src/lib/libshell/common/sh/io.c b/usr/src/lib/libshell/common/sh/io.c
index 547a67aa27..fdf72e2b86 100644
--- a/usr/src/lib/libshell/common/sh/io.c
+++ b/usr/src/lib/libshell/common/sh/io.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -1294,7 +1294,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
}
if(fd<0)
{
- if(sh_inuse(fn) || fn==shp->infd)
+ if(sh_inuse(fn) || (fn && fn==shp->infd))
{
if(fn>9 || !(shp->inuse_bits&(1<<fn)))
io_preserve(shp,shp->sftable[fn],fn);
diff --git a/usr/src/lib/libshell/common/sh/jobs.c b/usr/src/lib/libshell/common/sh/jobs.c
index 778be37706..46d4a21b9f 100644
--- a/usr/src/lib/libshell/common/sh/jobs.c
+++ b/usr/src/lib/libshell/common/sh/jobs.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -183,9 +183,11 @@ void job_chldtrap(Shell_t *shp, const char *trap, int unpost)
{
register struct process *pw,*pwnext;
pid_t bckpid;
- int oldexit;
+ int oldexit,trapnote;
job_lock();
shp->sigflag[SIGCHLD] &= ~SH_SIGTRAP;
+ trapnote = shp->trapnote;
+ shp->trapnote = 0;
for(pw=job.pwlist;pw;pw=pwnext)
{
pwnext = pw->p_nxtjob;
@@ -199,11 +201,12 @@ void job_chldtrap(Shell_t *shp, const char *trap, int unpost)
if(pw->p_flag&P_SIGNALLED)
shp->savexit |= SH_EXITSIG;
sh_trap(trap,0);
+ if(pw->p_pid==bckpid && unpost)
+ job_unpost(pw,0);
shp->savexit = oldexit;
shp->bckpid = bckpid;
- if(unpost)
- job_unpost(pw,0);
}
+ shp->trapnote = trapnote;
job_unlock();
}
#endif /* SHOPT_BGX */
@@ -285,7 +288,7 @@ int job_reap(register int sig)
if (pid<0 && errno==EINVAL && (flags&WCONTINUED))
pid = waitpid((pid_t)-1,&wstat,flags&=~WCONTINUED);
sh_sigcheck();
- if(sig && pid<0 && errno==EINTR)
+ if(pid<0 && errno==EINTR && (sig||job.savesig))
continue;
if(pid<=0)
break;
@@ -569,9 +572,15 @@ void job_init(Shell_t *shp, int lflag)
#ifdef SIGTSTP
/* make sure that we are a process group leader */
setpgid(0,shp->pid);
-# if defined(SA_NOCLDWAIT) && defined(_lib_sigflag)
+# if defined(SA_NOCLDSTOP) || defined(SA_NOCLDWAIT)
+# if !defined(SA_NOCLDSTOP)
+# define SA_NOCLDSTOP 0
+# endif
+# if !defined(SA_NOCLDWAIT)
+# define SA_NOCLDWAIT 0
+# endif
sigflag(SIGCHLD, SA_NOCLDSTOP|SA_NOCLDWAIT, 0);
-# endif /* SA_NOCLDWAIT */
+# endif /* SA_NOCLDSTOP || SA_NOCLDWAIT */
signal(SIGTTIN,SIG_IGN);
signal(SIGTTOU,SIG_IGN);
/* The shell now handles ^Z */
@@ -1177,7 +1186,7 @@ int job_post(pid_t pid, pid_t join)
job.pwlist = pw;
pw->p_env = sh.curenv;
pw->p_pid = pid;
- if(!sh.outpipe || sh_isoption(SH_PIPEFAIL))
+ if(!sh.outpipe || (sh_isoption(SH_PIPEFAIL) && job.waitall))
pw->p_flag = P_EXITSAVE;
pw->p_exitmin = sh.xargexit;
pw->p_exit = 0;
@@ -1413,7 +1422,7 @@ int job_wait(register pid_t pid)
}
}
px = job_unpost(pw,1);
- if(!px || !sh_isoption(SH_PIPEFAIL))
+ if(!px || !sh_isoption(SH_PIPEFAIL) || !job.waitall)
break;
pw = px;
continue;
@@ -1623,6 +1632,7 @@ static struct process *job_unpost(register struct process *pwtop,int notify)
pw->p_nxtjob = freelist;
freelist = pw;
}
+ pwtop->p_pid = 0;
#ifdef DEBUG
sfprintf(sfstderr,"ksh: job line %4d: free pid=%d critical=%d job=%d\n",__LINE__,getpid(),job.in_critical,pwtop->p_job);
sfsync(sfstderr);
@@ -1837,6 +1847,7 @@ void job_fork(pid_t parent)
job.in_critical = 0;
break;
default:
+ job_chksave(parent);
job_unlock();
break;
}
diff --git a/usr/src/lib/libshell/common/sh/lex.c b/usr/src/lib/libshell/common/sh/lex.c
index b5a0761dae..5a2f7c239f 100644
--- a/usr/src/lib/libshell/common/sh/lex.c
+++ b/usr/src/lib/libshell/common/sh/lex.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -273,6 +273,7 @@ Lex_t *sh_lexopen(Lex_t *lp, Shell_t *sp, int mode)
{
lp->lexd.noarg = lp->lexd.level= lp->lexd.dolparen = lp->lexd.balance = 0;
lp->lexd.nocopy = lp->lexd.docword = lp->lexd.nest = lp->lexd.paren = 0;
+ lp->lexd.lex_state = lp->lexd.lastc=0;
}
lp->comsub = 0;
return(lp);
@@ -1080,9 +1081,6 @@ int sh_lex(Lex_t* lp)
return(lp->token=EXPRSYM);
}
/* backward compatibility */
- if(lp->lexd.dolparen)
- fcseek(-1);
- else
{
if(lp->lexd.warn)
errormsg(SH_DICT,ERROR_warn(0),e_lexnested,shp->inlineno);
@@ -1487,7 +1485,7 @@ static int comsub(register Lex_t *lp, int endtok)
register int n,c,count=1;
register int line=lp->sh->inlineno;
char word[5];
- int messages=0, assignok=lp->assignok, csub;
+ int off, messages=0, assignok=lp->assignok, csub;
struct lexstate save;
save = lp->lex;
csub = lp->comsub;
@@ -1496,8 +1494,15 @@ static int comsub(register Lex_t *lp, int endtok)
lp->lex.incase=0;
pushlevel(lp,0,0);
lp->comsub = (endtok==LBRACE);
+ off = fcseek(0) - lp->lexd.first;
if(sh_lex(lp)==endtok)
{
+ if(endtok==LPAREN && fcseek(0)==lp->lexd.first)
+ {
+ count++;
+ lp->lexd.paren = 0;
+ fcseek(off+2);
+ }
while(1)
{
/* look for case and esac */
diff --git a/usr/src/lib/libshell/common/sh/macro.c b/usr/src/lib/libshell/common/sh/macro.c
index 684e2d0464..2af54f88f7 100644
--- a/usr/src/lib/libshell/common/sh/macro.c
+++ b/usr/src/lib/libshell/common/sh/macro.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -1852,7 +1852,7 @@ retry2:
mac_error(np);
}
}
- else if(var && sh_isoption(SH_NOUNSET) && (!np || nv_isnull(np) || (nv_isarray(np) && !np->nvalue.cp)))
+ else if(var && sh_isoption(SH_NOUNSET) && type<=M_TREE && (!np || nv_isnull(np) || (nv_isarray(np) && !np->nvalue.cp)))
{
if(np)
{
diff --git a/usr/src/lib/libshell/common/sh/main.c b/usr/src/lib/libshell/common/sh/main.c
index 54949b0d85..a1dc119bcb 100644
--- a/usr/src/lib/libshell/common/sh/main.c
+++ b/usr/src/lib/libshell/common/sh/main.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -443,7 +443,10 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
shp->st.execbrk = shp->st.breakcnt = 0;
/* check for return from profile or env file */
if(sh_isstate(SH_PROFILE) && (jmpval==SH_JMPFUN || jmpval==SH_JMPEXIT))
+ {
+ sh_setstate(states);
goto done;
+ }
if(!sh_isoption(SH_INTERACTIVE) || sh_isstate(SH_FORKED) || (jmpval > SH_JMPERREXIT && job_close(shp) >=0))
{
sh_offstate(SH_INTERACTIVE);
diff --git a/usr/src/lib/libshell/common/sh/name.c b/usr/src/lib/libshell/common/sh/name.c
index 2189a3a42a..84e9cced11 100644
--- a/usr/src/lib/libshell/common/sh/name.c
+++ b/usr/src/lib/libshell/common/sh/name.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -53,8 +53,8 @@ pathnative(const char* path, char* buf, size_t siz)
static void attstore(Namval_t*,void*);
#ifndef _ENV_H
-static void pushnam(Namval_t*,void*);
-static char *staknam(Namval_t*, char*);
+ static void pushnam(Namval_t*,void*);
+ static char *staknam(Namval_t*, char*);
#endif
static void ltou(char*);
static void utol(char*);
@@ -538,7 +538,11 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
}
if(!nv_isarray(np) && !typ && (tp->com.comarg || !tp->com.comset || tp->com.comset->argval[0]!='['))
+ {
nv_setvtree(np);
+ if(tp->com.comarg || tp->com.comset)
+ np->nvfun->dsize = 0;
+ }
#if SHOPT_TYPEDEF
goto check_type;
#else
@@ -753,7 +757,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
if(shp->var_tree->walk == shp->var_base)
{
nq = np;
- if(flags&NV_NOSCOPE)
+ if((flags&NV_NOSCOPE) && *cp!='.')
{
if(mode==0)
root = shp->var_base;
@@ -857,7 +861,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
}
shp->last_root = root;
- if(cp[1]=='.')
+ if(*cp && cp[1]=='.')
cp++;
if(c=='.' && (cp[1]==0 || cp[1]=='=' || cp[1]=='+'))
{
@@ -1357,9 +1361,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
register char *cp;
register int size = 0;
register int dot;
-#ifdef _ENV_H
int was_local = nv_local;
-#endif
union Value u;
if(!(flags&NV_RDONLY) && nv_isattr (np, NV_RDONLY))
errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np));
@@ -1376,10 +1378,8 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
{
nv_local=1;
nv_putv(np,sp,flags,np->nvfun);
-#ifdef _ENV_H
if(sp && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT)))
sh_envput(sh.env,np);
-#endif
return;
}
/* called from disc, assign the actual value */
@@ -1639,7 +1639,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
if(nv_isattr(np,NV_BINARY) && !(flags&NV_RAW))
tofree = 0;
- if(nv_isattr(np,NV_LJUST|NV_RJUST))
+ if(nv_isattr(np,NV_LJUST|NV_RJUST) && nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST))
tofree = 0;
if (sp)
{
@@ -1680,11 +1680,11 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
else
#endif
- if(size==0 && nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
+ if(size==0 && nv_isattr(np,NV_HOST)!=NV_HOST &&nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
nv_setsize(np,size=dot);
else if(size > dot)
dot = size;
- else if(nv_isattr(np,NV_LJUST) && dot>size)
+ else if(nv_isattr(np,NV_LJUST|NV_RJUST)==NV_LJUST && dot>size)
dot = size;
if(size==0 || tofree || !(cp=(char*)up->cp))
{
@@ -1709,9 +1709,9 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
cp[dot] = c;
if(nv_isattr(np, NV_RJUST) && nv_isattr(np, NV_ZFILL))
rightjust(cp,size,'0');
- else if(nv_isattr(np, NV_RJUST))
+ else if(nv_isattr(np, NV_LJUST|NV_RJUST)==NV_RJUST)
rightjust(cp,size,' ');
- else if(nv_isattr(np, NV_LJUST))
+ else if(nv_isattr(np, NV_LJUST|NV_RJUST)==NV_LJUST)
{
register char *dp;
dp = strlen (cp) + cp;
@@ -1729,10 +1729,8 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
if(tofree && tofree!=Empty)
free((void*)tofree);
}
-#ifdef _ENV_H
if(!was_local && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT)))
sh_envput(sh.env,np);
-#endif
return;
}
@@ -1920,11 +1918,8 @@ static void pushnam(Namval_t *np, void *data)
register struct adata *ap = (struct adata*)data;
ap->sh = &sh;
ap->tp = 0;
- if(nv_isattr(np,NV_IMPORT))
- {
- if(np->nvenv)
- *ap->argnam++ = np->nvenv;
- }
+ if(nv_isattr(np,NV_IMPORT) && np->nvenv)
+ *ap->argnam++ = np->nvenv;
else if(value=nv_getval(np))
*ap->argnam++ = staknam(np,value);
if(nv_isattr(np,NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER))
@@ -2001,7 +1996,7 @@ static int scanfilter(Dt_t *dict, void *arg, void *data)
register struct adata *tp = (struct adata*)sp->scandata;
NOT_USED(dict);
#if SHOPT_TYPEDEF
- if(tp && !is_abuiltin(np) && tp && tp->tp && nv_type(np)!=tp->tp)
+ if(!is_abuiltin(np) && tp && tp->tp && nv_type(np)!=tp->tp)
return(0);
#endif /*SHOPT_TYPEDEF */
if(sp->scanmask?(k&sp->scanmask)==sp->scanflags:(!sp->scanflags || (k&sp->scanflags)))
@@ -2153,10 +2148,8 @@ static void table_unset(Shell_t *shp, register Dt_t *root, int flags, Dt_t *oroo
shp->subshell = subshell;
np->nvfun = 0;
}
-#ifdef _ENV_H
if(nv_isattr(nq,NV_EXPORT))
sh_envput(shp->env,nq);
-#endif
}
npnext = (Namval_t*)dtnext(root,np);
shp->last_root = root;
@@ -2556,8 +2549,10 @@ done:
if(up->cp && nv_isattr(np,NV_BINARY) && !nv_isattr(np,NV_RAW))
{
char *cp;
+ char *ep;
int size= nv_size(np), insize=(4*size)/3+size/45+8;
- base64encode(up->cp, size, (void**)0, cp=getbuf(insize), insize, (void**)0);
+ base64encode(up->cp, size, (void**)0, cp=getbuf(insize), insize, (void**)&ep);
+ *ep = 0;
return(cp);
}
#endif
@@ -2673,7 +2668,6 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
n = np->nvflag;
if(newatts&NV_EXPORT)
nv_offattr(np,NV_IMPORT);
-#ifdef _ENV_H
if(((n^newatts)&NV_EXPORT))
{
/* record changes to the environment */
@@ -2682,7 +2676,6 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
else
sh_envput(sh.env,np);
}
-#endif
oldsize = nv_size(np);
if((size==oldsize|| (n&NV_INTEGER)) && ((n^newatts)&~NV_NOCHANGE)==0)
{
@@ -2726,7 +2719,7 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
}
else
nv_unset(np);
- if(size==0 && (newatts&(NV_LJUST|NV_RJUST|NV_ZFILL)))
+ if(size==0 && (newatts&NV_HOST)!=NV_HOST && (newatts&(NV_LJUST|NV_RJUST|NV_ZFILL)))
size = n;
}
else
@@ -2749,7 +2742,6 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
return;
}
-#ifndef _NEXT_SOURCE
static char *oldgetenv(const char *string)
{
register char c0,c1;
@@ -2774,20 +2766,34 @@ static char *oldgetenv(const char *string)
/*
* This version of getenv uses the hash storage to access environment values
*/
-char *getenv(const char *name)
+char *sh_getenv(const char *name)
/*@
assume name!=0;
@*/
{
register Namval_t *np;
if(!sh.var_tree)
- return(oldgetenv(name));
- if((np = nv_search(name,sh.var_tree,0)) && nv_isattr(np,NV_EXPORT))
+ {
+#if 0
+ if(name[0] == 'P' && name[1] == 'A' && name[2] == 'T' && name[3] == 'H' && name[4] == 0 || name[0] == 'L' && ((name[1] == 'C' || name[1] == 'D') && name[2] == '_' || name[1] == 'A' && name[1] == 'N') || name[0] == 'V' && name[1] == 'P' && name[2] == 'A' && name[3] == 'T' && name[4] == 'H' && name[5] == 0 || name[0] == '_' && name[1] == 'R' && name[2] == 'L' && name[3] == 'D' || name[0] == '_' && name[1] == 'A' && name[2] == 'S' && name[3] == 'T' && name[4] == '_')
+#endif
+ return(oldgetenv(name));
+ }
+ else if((np = nv_search(name,sh.var_tree,0)) && nv_isattr(np,NV_EXPORT))
return(nv_getval(np));
- if(name[0] == 'P' && name[1] == 'A' && name[2] == 'T' && name[3] == 'H' && name[4] == 0)
- return(oldgetenv(name));
return(0);
}
+
+#ifndef _NEXT_SOURCE
+/*
+ * Some dynamic linkers will make this file see the libc getenv(),
+ * so sh_getenv() is used for the astintercept() callback. Plain
+ * getenv() is provided for static links.
+ */
+char *getenv(const char *name)
+{
+ return sh_getenv(name);
+}
#endif /* _NEXT_SOURCE */
#undef putenv
@@ -2806,11 +2812,10 @@ int putenv(const char *name)
return(0);
}
-
/*
- * Override libast setenv()
+ * Override libast setenviron().
*/
-char* setenviron(const char *name)
+char* sh_setenviron(const char *name)
{
register Namval_t *np;
if(name)
@@ -2824,6 +2829,14 @@ char* setenviron(const char *name)
}
/*
+ * Same linker dance as with getenv() above.
+ */
+char* setenviron(const char *name)
+{
+ return sh_setenviron(name);
+}
+
+/*
* convert <str> to upper case
*/
static void ltou(register char *str)
diff --git a/usr/src/lib/libshell/common/sh/nvdisc.c b/usr/src/lib/libshell/common/sh/nvdisc.c
index 94b2d28ca9..7c8918ef1f 100644
--- a/usr/src/lib/libshell/common/sh/nvdisc.c
+++ b/usr/src/lib/libshell/common/sh/nvdisc.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -431,6 +431,12 @@ char *nv_setdisc(register Namval_t* np,register const char *event,Namval_t *acti
register struct vardisc *vp = (struct vardisc*)np->nvfun;
register int type;
char *empty = "";
+ while(vp)
+ {
+ if(vp->fun.disc && (vp->fun.disc->setdisc || vp->fun.disc->putval == assign))
+ break;
+ vp = (struct vardisc*)vp->fun.next;
+ }
if(vp && !vp->fun.disc)
vp = 0;
if(np == (Namval_t*)fp)
@@ -494,6 +500,8 @@ char *nv_setdisc(register Namval_t* np,register const char *event,Namval_t *acti
memset(dp,0,sizeof(*dp));
dp->dsize = sizeof(struct vardisc);
dp->putval = assign;
+ if(nv_isarray(np) && !nv_arrayptr(np))
+ nv_putsub(np,(char*)0, 1);
nv_stack(np, (Namfun_t*)vp);
}
if(action==np)
@@ -907,6 +915,8 @@ int nv_clone(Namval_t *np, Namval_t *mp, int flags)
nv_setsize(mp,nv_size(np));
if(mp->nvflag == flag)
mp->nvflag = (np->nvflag&~(NV_MINIMAL))|(mp->nvflag&NV_MINIMAL);
+ if(nv_isattr(np,NV_EXPORT))
+ mp->nvflag |= (np->nvflag&NV_MINIMAL);
if(mp->nvalue.cp==val && !nv_isattr(np,NV_INTEGER))
{
if(np->nvalue.cp && np->nvalue.cp!=Empty && (flags&NV_COMVAR) && !(flags&NV_MOVE))
@@ -927,8 +937,13 @@ int nv_clone(Namval_t *np, Namval_t *mp, int flags)
np->nvfun = 0;
np->nvalue.cp = 0;
if(!nv_isattr(np,NV_MINIMAL) || nv_isattr(mp,NV_EXPORT))
+ {
+ mp->nvenv = np->nvenv;
np->nvenv = 0;
- np->nvflag &= NV_MINIMAL;
+ np->nvflag = 0;
+ }
+ else
+ np->nvflag &= NV_MINIMAL;
nv_setsize(np,0);
return(1);
}
@@ -1368,3 +1383,14 @@ const Namdisc_t *nv_discfun(int which)
return(0);
}
+int nv_hasget(Namval_t *np)
+{
+ register Namfun_t *fp;
+ for(fp=np->nvfun; fp; fp=fp->next)
+ {
+ if(!fp->disc || (!fp->disc->getnum && !fp->disc->getval))
+ continue;
+ return(1);
+ }
+ return(0);
+}
diff --git a/usr/src/lib/libshell/common/sh/nvtree.c b/usr/src/lib/libshell/common/sh/nvtree.c
index 36d7d933e3..eaa0dc99d2 100644
--- a/usr/src/lib/libshell/common/sh/nvtree.c
+++ b/usr/src/lib/libshell/common/sh/nvtree.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -69,6 +69,7 @@ static int read_tree(Namval_t* np, Sfio_t *iop, int n, Namfun_t *dp)
static Namval_t *create_tree(Namval_t *np,const char *name,int flag,Namfun_t *dp)
{
register Namfun_t *fp=dp;
+ fp->dsize = 0;
while(fp=fp->next)
{
if(fp->disc && fp->disc->createf)
@@ -723,7 +724,10 @@ static void outval(char *name, const char *vname, struct Walk *wp)
nv_attribute(np,wp->out,"typeset",'=');
nv_outname(wp->out,name,-1);
if((np->nvalue.cp && np->nvalue.cp!=Empty) || nv_isattr(np,~(NV_MINIMAL|NV_NOFREE)) || nv_isvtree(np))
- sfputc(wp->out,(isarray==2?'\n':'='));
+ {
+ if(wp->indent>=0 || isarray!=2)
+ sfputc(wp->out,(isarray==2?'\n':'='));
+ }
if(isarray==2)
return;
}
@@ -1015,7 +1019,7 @@ Namfun_t *nv_isvtree(Namval_t *np)
*/
char *nv_getvtree(register Namval_t *np, Namfun_t *fp)
{
- int flags=0;
+ int flags=0, dsize=fp->dsize;
for(; fp && fp->next; fp=fp->next)
{
if(fp->next->disc && (fp->next->disc->getnum || fp->next->disc->getval))
@@ -1027,6 +1031,8 @@ char *nv_getvtree(register Namval_t *np, Namfun_t *fp)
return(nv_getv(np,fp));
if(flags = nv_isattr(np,NV_EXPORT))
nv_offattr(np,NV_EXPORT);
+ if(dsize && (flags&NV_EXPORT))
+ return("()");
return(walk_tree(np,(Namval_t*)0,flags));
}
@@ -1083,6 +1089,7 @@ void nv_setvtree(register Namval_t *np)
return;
nfp = newof(NIL(void*),Namfun_t,1,0);
nfp->disc = &treedisc;
+ nfp->dsize = sizeof(Namfun_t);
nv_stack(np, nfp);
}
diff --git a/usr/src/lib/libshell/common/sh/nvtype.c b/usr/src/lib/libshell/common/sh/nvtype.c
index 82eab00d83..603f72111e 100644
--- a/usr/src/lib/libshell/common/sh/nvtype.c
+++ b/usr/src/lib/libshell/common/sh/nvtype.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -1140,6 +1140,7 @@ else sfprintf(sfstderr,"tp==NULL\n");
{
sp= (char*)&np->nvalue;
nv_onattr(nq,NV_INT16P);
+ j = 1;
}
if(sp)
memcpy((char*)nq->nvalue.cp,sp,dsize);
diff --git a/usr/src/lib/libshell/common/sh/parse.c b/usr/src/lib/libshell/common/sh/parse.c
index c7290d20e7..28d52ac769 100644
--- a/usr/src/lib/libshell/common/sh/parse.c
+++ b/usr/src/lib/libshell/common/sh/parse.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -247,6 +247,34 @@ static Shnode_t *makeparent(Lex_t *lp, int flag, Shnode_t *child)
return(par);
}
+static int paramsub(const char *str)
+{
+ register int c,sub=0,lit=0;
+ while(c= *str++)
+ {
+ if(c=='$' && !lit)
+ {
+ if(*str=='(')
+ return(0);
+ if(sub)
+ continue;
+ if(*str=='{')
+ str++;
+ if(!isdigit(*str) && strchr("?#@*!$ ",*str)==0)
+ return(1);
+ }
+ else if(c=='`')
+ return(0);
+ else if(c=='[' && !lit)
+ sub++;
+ else if(c==']' && !lit)
+ sub--;
+ else if(c=='\'')
+ lit = !lit;
+ }
+ return(0);
+}
+
static Shnode_t *getanode(Lex_t *lp, struct argnod *ap)
{
register Shnode_t *t = getnode(arithnod);
@@ -256,7 +284,11 @@ static Shnode_t *getanode(Lex_t *lp, struct argnod *ap)
if(ap->argflag&ARG_RAW)
t->ar.arcomp = sh_arithcomp(ap->argval);
else
+ {
+ if(sh_isoption(SH_NOEXEC) && (ap->argflag&ARG_MAC) && paramsub(ap->argval))
+ errormsg(SH_DICT,ERROR_warn(0),"%d: parameter substitution requires unnecessary string to number conversion",lp->sh->inlineno-(lp->token=='\n'));
t->ar.arcomp = 0;
+ }
return(t);
}
@@ -797,6 +829,8 @@ static Shnode_t *funct(Lex_t *lexp)
}
t->funct.functtre = item(lexp,SH_NOIO);
}
+ else if(shp->shcomp)
+ exit(1);
sh_popcontext(&buff);
loop_level = saveloop;
label_last = savelabel;
@@ -1413,7 +1447,7 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
*argtail = 0;
if(argno>0)
argmax = argno;
- t->comtyp = TCOM | (argmax<<(COMBITS+2));
+ t->comtyp = TCOM;
#if SHOPT_KIA
if(lexp->kiafile && !(flag&SH_NOIO))
{
diff --git a/usr/src/lib/libshell/common/sh/path.c b/usr/src/lib/libshell/common/sh/path.c
index 94af2fe682..c6f691aef4 100644
--- a/usr/src/lib/libshell/common/sh/path.c
+++ b/usr/src/lib/libshell/common/sh/path.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -39,8 +39,6 @@
#if SHOPT_PFSH
# ifdef _hdr_exec_attr
# include <exec_attr.h>
-# else
-# undef SHOPT_PFSH
# endif
# if _lib_vfork
# include <ast_vfork.h>
@@ -139,7 +137,10 @@ static pid_t _spawnveg(const char *path, char* const argv[], char* const envp[],
_sh_fork(pid, 0, (int*)0);
}
job.waitsafe = waitsafe;
- job_unlock();
+ if(pid>0)
+ job_fork(pid);
+ else
+ job_unlock();
return(pid);
}
/*
@@ -1497,7 +1498,7 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int
}
*cp = 0;
m = ep ? (ep-sp) : 0;
- if(!m || m==6 && memcmp((void*)sp,(void*)"FPATH=",6)==0)
+ if(m==0 || m==6 && memcmp((void*)sp,(void*)"FPATH=",6)==0)
{
if(first)
{
@@ -1509,8 +1510,13 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int
}
else if(m==12 && memcmp((void*)sp,(void*)"BUILTIN_LIB=",12)==0)
{
- if(!(pp->flags & PATH_BUILTIN_LIB))
+ if(!(pp->flags & PATH_BUILTIN_LIB) || strchr(ep,'-'))
{
+ if ((pp->flags & (PATH_BUILTIN_LIB|PATH_STD_DIR)) == PATH_BUILTIN_LIB)
+ {
+ free(pp->blib);
+ pp->blib = 0;
+ }
pp->flags |= PATH_BUILTIN_LIB;
if (*ep == '.' && !*(ep + 1))
pp->flags |= PATH_STD_DIR;
diff --git a/usr/src/lib/libshell/common/sh/pmain.c b/usr/src/lib/libshell/common/sh/pmain.c
index 8cab334192..f04a799719 100644
--- a/usr/src/lib/libshell/common/sh/pmain.c
+++ b/usr/src/lib/libshell/common/sh/pmain.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/shcomp.c b/usr/src/lib/libshell/common/sh/shcomp.c
index 1cd0383673..6ba9c0c3e7 100644
--- a/usr/src/lib/libshell/common/sh/shcomp.c
+++ b/usr/src/lib/libshell/common/sh/shcomp.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -36,7 +36,7 @@ USAGE_LICENSE
"script.]"
"[+?Since aliases are processed as the script is read, alias definitions "
"whose value requires variable expansion will not work correctly.]"
-"[+?If \b-D\b is specifed, all double quoted strings that are preceded by "
+"[+?If \b-D\b is specified, all double quoted strings that are preceded by "
"\b$\b are output. These are the messages that need to be "
"translated to locale specific versions for internationalization.]"
"[+?If \aoutfile\a is omitted, then the results will be written to "
diff --git a/usr/src/lib/libshell/common/sh/streval.c b/usr/src/lib/libshell/common/sh/streval.c
index 92a8256594..7053831da0 100644
--- a/usr/src/lib/libshell/common/sh/streval.c
+++ b/usr/src/lib/libshell/common/sh/streval.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -34,6 +34,7 @@
#include <error.h>
#include <stak.h>
#include "FEATURE/externs"
+#include "defs.h" /* for sh.decomma */
#ifndef ERROR_dictionary
# define ERROR_dictionary(s) (s)
@@ -162,6 +163,8 @@ Sfdouble_t arith_exec(Arith_t *ep)
node.emode = ep->emode;
node.expr = ep->expr;
node.elen = ep->elen;
+ node.value = 0;
+ node.nosub = 0;
if(level++ >=MAXLEVEL)
{
arith_error(e_recursive,ep->expr,ep->emode);
@@ -195,17 +198,21 @@ Sfdouble_t arith_exec(Arith_t *ep)
type=0;
break;
case A_PLUSPLUS:
+ node.nosub = 1;
(*ep->fun)(&ptr,&node,ASSIGN,num+1);
break;
case A_MINUSMINUS:
+ node.nosub = 1;
(*ep->fun)(&ptr,&node,ASSIGN,num-1);
break;
case A_INCR:
num = num+1;
+ node.nosub = 1;
num = (*ep->fun)(&ptr,&node,ASSIGN,num);
break;
case A_DECR:
num = num-1;
+ node.nosub = 1;
num = (*ep->fun)(&ptr,&node,ASSIGN,num);
break;
case A_SWAP:
@@ -248,6 +255,8 @@ Sfdouble_t arith_exec(Arith_t *ep)
*++tp = type;
c = 0;
break;
+ case A_ASSIGNOP:
+ node.nosub = 1;
case A_STORE:
cp = roundptr(ep,cp,Sfdouble_t*);
dp = *((Sfdouble_t**)cp);
@@ -430,15 +439,21 @@ static int gettok(register struct vars *vp)
case A_EOF:
vp->nextchr--;
break;
- /*FALL THRU*/
- case A_DIG: case A_REG: case A_DOT: case A_LIT:
- if(op==A_DOT)
+ case A_COMMA:
+ if(sh.decomma && (c=peekchr(vp))>='0' && c<='9')
{
- if((c=peekchr(vp))>='0' && c<='9')
- op = A_DIG;
- else
- op = A_REG;
+ op = A_DIG;
+ goto keep;
}
+ break;
+ case A_DOT:
+ if((c=peekchr(vp))>='0' && c<='9')
+ op = A_DIG;
+ else
+ op = A_REG;
+ /*FALL THRU*/
+ case A_DIG: case A_REG: case A_LIT:
+ keep:
ungetchr(vp);
break;
case A_QUEST:
@@ -483,7 +498,7 @@ static int expr(register struct vars *vp,register int precedence)
int invalid,wasop=0;
struct lval lvalue,assignop;
const char *pos;
- Sfdouble_t d;
+ Sfdouble_t d;
lvalue.value = 0;
lvalue.fun = 0;
@@ -603,7 +618,7 @@ again:
}
if(!expr(vp,c))
{
- stakseek(-1);
+ stakseek(staktell()-1);
return(0);
}
lvalue.value = 0;
@@ -784,7 +799,7 @@ again:
vp->stakmaxsize = vp->staksize;
if(assignop.flag<0)
assignop.flag = 0;
- stakputc(A_STORE);
+ stakputc(c&1?A_ASSIGNOP:A_STORE);
stakpush(vp,assignop.value,char*);
stakpush(vp,assignop.flag,short);
}
diff --git a/usr/src/lib/libshell/common/sh/string.c b/usr/src/lib/libshell/common/sh/string.c
index 89b34159e5..648e40ee05 100644
--- a/usr/src/lib/libshell/common/sh/string.c
+++ b/usr/src/lib/libshell/common/sh/string.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/subshell.c b/usr/src/lib/libshell/common/sh/subshell.c
index 9f6eeafdd9..23ad7c3cac 100644
--- a/usr/src/lib/libshell/common/sh/subshell.c
+++ b/usr/src/lib/libshell/common/sh/subshell.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -213,6 +213,7 @@ void sh_subfork(void)
/* setting subpid to 1 causes subshell to exit when reached */
sh_onstate(SH_FORKED);
sh_onstate(SH_NOLOG);
+ sh_offoption(SH_MONITOR);
sh_offstate(SH_MONITOR);
subshell_data = 0;
shp->subshell = 0;
diff --git a/usr/src/lib/libshell/common/sh/suid_exec.c b/usr/src/lib/libshell/common/sh/suid_exec.c
index 04fad8051e..a29a744dec 100644
--- a/usr/src/lib/libshell/common/sh/suid_exec.c
+++ b/usr/src/lib/libshell/common/sh/suid_exec.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/tdump.c b/usr/src/lib/libshell/common/sh/tdump.c
index afdd6336dd..444ed340db 100644
--- a/usr/src/lib/libshell/common/sh/tdump.c
+++ b/usr/src/lib/libshell/common/sh/tdump.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -26,11 +26,11 @@
*
*/
-#include <ccode.h>
#include "defs.h"
#include "shnodes.h"
#include "path.h"
#include "io.h"
+#include <ccode.h>
static int p_comlist(const struct dolnod*);
static int p_arg(const struct argnod*);
diff --git a/usr/src/lib/libshell/common/sh/timers.c b/usr/src/lib/libshell/common/sh/timers.c
index 7508525834..cd69eb220d 100644
--- a/usr/src/lib/libshell/common/sh/timers.c
+++ b/usr/src/lib/libshell/common/sh/timers.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/trestore.c b/usr/src/lib/libshell/common/sh/trestore.c
index 98ae02a004..1034f1f3f9 100644
--- a/usr/src/lib/libshell/common/sh/trestore.c
+++ b/usr/src/lib/libshell/common/sh/trestore.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -26,11 +26,11 @@
*
*/
-#include <ccode.h>
#include "defs.h"
#include "shnodes.h"
#include "path.h"
#include "io.h"
+#include <ccode.h>
static struct dolnod *r_comlist(Shell_t*);
static struct argnod *r_arg(Shell_t*);
diff --git a/usr/src/lib/libshell/common/sh/waitevent.c b/usr/src/lib/libshell/common/sh/waitevent.c
index d04ea1d809..ae246b4727 100644
--- a/usr/src/lib/libshell/common/sh/waitevent.c
+++ b/usr/src/lib/libshell/common/sh/waitevent.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/common/sh/xec.c b/usr/src/lib/libshell/common/sh/xec.c
index 2e59e8a8f2..e6ba69dd74 100644
--- a/usr/src/lib/libshell/common/sh/xec.c
+++ b/usr/src/lib/libshell/common/sh/xec.c
@@ -1,7 +1,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
@@ -608,7 +608,7 @@ static void free_list(struct openlist *olist)
* set ${.sh.name} and ${.sh.subscript}
* set _ to reference for ${.sh.name}[$.sh.subscript]
*/
-static int set_instance(Namval_t *nq, Namval_t *node, struct Namref *nr)
+static int set_instance(Shell_t *shp,Namval_t *nq, Namval_t *node, struct Namref *nr)
{
char *sp=0,*cp = nv_name(nq);
Namarr_t *ap;
@@ -616,8 +616,10 @@ static int set_instance(Namval_t *nq, Namval_t *node, struct Namref *nr)
nr->np = nq;
nr->root = sh.var_tree;
nr->table = sh.last_table;
+ shp->instance = 1;
if((ap=nv_arrayptr(nq)) && (sp = nv_getsub(nq)))
sp = strdup(sp);
+ shp->instance = 0;
if(sh.var_tree!=sh.var_base && !nv_open(cp,nr->root,NV_VARNAME|NV_NOREF|NV_NOSCOPE|NV_NOADD|NV_NOFAIL))
nr->root = sh.var_base;
nv_putval(SH_NAMENOD, cp, NV_NOFREE);
@@ -1121,7 +1123,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(nq)
{
shp->last_table = last_table;
- mode = set_instance(nq,&node,&nr);
+ mode = set_instance(shp,nq,&node,&nr);
}
if(io)
{
@@ -1172,6 +1174,7 @@ int sh_exec(register const Shnode_t *t, int flags)
}
no_fork = !ntflag && !(type&(FAMP|FPOU)) &&
!shp->st.trapcom[0] && !shp->st.trap[SH_ERRTRAP] &&
+ ((struct checkpt*)shp->jmplist)->mode!=SH_JMPEVAL &&
(execflg2 || (execflg &&
!shp->subshell && shp->fn_depth==0 &&
!(pipejob && sh_isoption(SH_PIPEFAIL))
@@ -1333,8 +1336,10 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_redirect(shp,t->tre.treio,1);
if(shp->topfd > topfd)
{
+ job_lock();
while((parent = vfork()) < 0)
_sh_fork(parent, 0, (int*)0);
+ job_fork(parent);
if(parent)
{
job_clear();
@@ -2668,6 +2673,8 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
stakset(savstak,0);
shp->options = options;
shp->last_root = last_root;
+ if(jmpval == SH_JMPSUB)
+ siglongjmp(*shp->jmplist,jmpval);
if(trap)
{
sh_trap(trap,0);
@@ -2766,7 +2773,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
while(argv[n])
n++;
if(nq)
- mode = set_instance(nq,&node, &nr);
+ mode = set_instance(shp,nq,&node, &nr);
if(is_abuiltin(np))
{
int jmpval;
diff --git a/usr/src/lib/libshell/common/tests/alias.sh b/usr/src/lib/libshell/common/tests/alias.sh
index f527faf23e..d4bcb73f67 100644
--- a/usr/src/lib/libshell/common/tests/alias.sh
+++ b/usr/src/lib/libshell/common/tests/alias.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/append.sh b/usr/src/lib/libshell/common/tests/append.sh
index d3e10c9100..947d6d7e29 100644
--- a/usr/src/lib/libshell/common/tests/append.sh
+++ b/usr/src/lib/libshell/common/tests/append.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/arith.sh b/usr/src/lib/libshell/common/tests/arith.sh
index 47c9619c75..457826fcfb 100644
--- a/usr/src/lib/libshell/common/tests/arith.sh
+++ b/usr/src/lib/libshell/common/tests/arith.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -529,4 +529,34 @@ i=0 j=1
[[ $(printf "%d" N[j]-N[i]) == 6 ]] || err_exit 'printf %d N[i]-N[j] failed'
[[ $((N[j]-N[i])) == 6 ]] || err_exit '$((N[j]-N[i])) incorrect'
+unset a x
+x=0
+((a[++x]++))
+(( x==1)) || err_exit '((a[++x]++)) should only increment x once'
+(( a[1]==1)) || err_exit 'a[1] not incremented'
+unset a
+x=0
+((a[x++]++))
+(( x==1)) || err_exit '((a[x++]++)) should only increment x once'
+(( a[0]==1)) || err_exit 'a[0] not incremented'
+unset a
+x=0
+((a[x+=2]+=1))
+(( x==2)) || err_exit '((a[x+=2]++)) should result in x==2'
+(( a[2]==1)) || err_exit 'a[0] not 1'
+
+unset a i
+typeset -a a
+i=1
+(( a[i]=1 ))
+(( a[0] == 0 )) || err_exit 'a[0] not 0'
+(( a[1] == 1 )) || err_exit 'a[1] not 1'
+
+unset a
+typeset -i a
+for ((i=0;i<1000;i++))
+do ((a[RANDOM%2]++))
+done
+(( (a[0]+a[1])==1000)) || err_exit '(a[0]+a[1])!=1000'
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/arrays.sh b/usr/src/lib/libshell/common/tests/arrays.sh
index 996101409f..a483b50072 100644
--- a/usr/src/lib/libshell/common/tests/arrays.sh
+++ b/usr/src/lib/libshell/common/tests/arrays.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -336,18 +336,20 @@ unset bam
print 'print ${var[0]} ${var[1]}' > $tmp/script
chmod +x $tmp/script
[[ $($SHELL -c "var=(foo bar);export var;$tmp/script") == foo ]] || err_exit 'export array not exporting just first element'
+
unset foo
-set -o allexport
+set --allexport
foo=one
foo[1]=two
foo[0]=three
-[[ $foo == three ]] || err_exit 'export all not working with arrays'
+[[ $foo == three ]] || err_exit '--allexport not working with arrays'
+set --noallexport
+unset foo
+
cat > $tmp/script <<- \!
typeset -A foo
print foo${foo[abc]}
!
-# 04-05-24 bug fix
-unset foo
[[ $($SHELL -c "typeset -A foo;$tmp/script") == foo ]] 2> /dev/null || err_exit 'empty associative arrays not being cleared correctly before scripts'
[[ $($SHELL -c "typeset -A foo;foo[abc]=abc;$tmp/script") == foo ]] 2> /dev/null || err_exit 'associative arrays not being cleared correctly before scripts'
unset foo
@@ -378,8 +380,12 @@ foo=bar
set -- "${foo[@]:1}"
(( $# == 0 )) || err_exit '${foo[@]:1} should not have any values'
unset bar
+exp=4
: ${_foo[bar=4]}
-(( bar == 4 )) || err_exit 'subscript of unset variable not evaluated'
+(( bar == 4 )) || err_exit "subscript of unset variable not evaluated -- expected '4', got '$got'"
+unset bar
+: ${_foo[bar=$exp]}
+(( bar == $exp )) || err_exit "subscript of unset variable not evaluated -- expected '$exp', got '$got'"
unset foo bar
foo[5]=4
bar[4]=3
@@ -473,4 +479,23 @@ FILTER[0].scope=include
FILTER[1].scope=exclude
[[ ${#FILTER[@]} == 2 ]] || err_exit "FILTER array should have two elements not ${#FILTER[@]}"
+unset x
+function x.get
+{
+ print sub=${.sh.subscript}
+}
+x[2]=
+z=$(: ${x[1]} )
+[[ $z == sub=1 ]] || err_exit 'get function not invoked for index array'
+
+unset x
+typeset -A x
+function x.get
+{
+ print sub=${.sh.subscript}
+}
+x[2]=
+z=$(: ${x[1]} )
+[[ $z == sub=1 ]] || err_exit 'get function not invoked for associative array'
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/arrays2.sh b/usr/src/lib/libshell/common/tests/arrays2.sh
index ee8f0ae315..21037f1075 100644
--- a/usr/src/lib/libshell/common/tests/arrays2.sh
+++ b/usr/src/lib/libshell/common/tests/arrays2.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/attributes.sh b/usr/src/lib/libshell/common/tests/attributes.sh
index 474972c03b..da6c2292d0 100644
--- a/usr/src/lib/libshell/common/tests/attributes.sh
+++ b/usr/src/lib/libshell/common/tests/attributes.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -324,4 +324,40 @@ unset foo
$SHELL 2> /dev/null -c 'export foo=(bar=3)' && err_exit 'compound variables cannot be exported'
+$SHELL -c 'builtin date' >/dev/null 2>&1 &&
+{
+
+# check env var changes against a builtin that uses the env var
+
+SEC=1234252800
+ETZ=EST5EDT
+EDT=03
+PTZ=PST8PDT
+PDT=00
+
+CMD="date -f%H \\#$SEC"
+
+export TZ=$ETZ
+
+set -- \
+ "$EDT $PDT $EDT" "" "TZ=$PTZ" "" \
+ "$EDT $PDT $EDT" "" "TZ=$PTZ" "TZ=$ETZ" \
+ "$EDT $PDT $EDT" "TZ=$ETZ" "TZ=$PTZ" "TZ=$ETZ" \
+ "$PDT $EDT $PDT" "TZ=$PTZ" "" "TZ=$PTZ" \
+ "$PDT $EDT $PDT" "TZ=$PTZ" "TZ=$ETZ" "TZ=$PTZ" \
+ "$EDT $PDT $EDT" "foo=bar" "TZ=$PTZ" "TZ=$ETZ" \
+
+while (( $# >= 4 ))
+do exp=$1
+ got=$(print $($SHELL -c "builtin date; $2 $CMD; $3 $CMD; $4 $CMD"))
+ [[ $got == $exp ]] || err_exit "[ '$2' '$3' '$4' ] env sequence failed -- expected '$exp', got '$got'"
+ shift 4
+done
+
+}
+
+unset v
+typeset -H v=/dev/null
+[[ $v == *nul* ]] || err_exit 'typeset -H for /dev/null not working'
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/basic.sh b/usr/src/lib/libshell/common/tests/basic.sh
index 597833e74f..04d2532b68 100644
--- a/usr/src/lib/libshell/common/tests/basic.sh
+++ b/usr/src/lib/libshell/common/tests/basic.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -465,4 +465,18 @@ got=$(
( $SHELL -c 'trap : DEBUG; x=( $foo); exit 0') 2> /dev/null || err_exit 'trap DEBUG fails'
+true=$(whence -p true)
+set -o pipefail
+float start=$SECONDS end
+for ((i=0; i < 2; i++))
+do print foo
+ sleep 1.5
+done | { read; $true; end=$SECONDS ;}
+(( (SECONDS-start) < 1 )) && err_exit "pipefail not waiting for pipe to finish"
+set +o pipefail
+(( (SECONDS-start) > 2 )) && err_exit "pipefail causing /bin/true to wait for other end of pipe"
+
+
+{ env A__z=C+SHLVL $SHELL -c : ;} 2> /dev/null || err_exit "SHLVL with wrong attribute fails"
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/bracket.sh b/usr/src/lib/libshell/common/tests/bracket.sh
index 496fdae5a4..f43e10ed03 100644
--- a/usr/src/lib/libshell/common/tests/bracket.sh
+++ b/usr/src/lib/libshell/common/tests/bracket.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/builtins.sh b/usr/src/lib/libshell/common/tests/builtins.sh
index cbd78fa98b..810551a806 100644
--- a/usr/src/lib/libshell/common/tests/builtins.sh
+++ b/usr/src/lib/libshell/common/tests/builtins.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/case.sh b/usr/src/lib/libshell/common/tests/case.sh
index 1f04cfd30d..40a2a32941 100644
--- a/usr/src/lib/libshell/common/tests/case.sh
+++ b/usr/src/lib/libshell/common/tests/case.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/comvar.sh b/usr/src/lib/libshell/common/tests/comvar.sh
index 00eac1d188..810ceb14c8 100644
--- a/usr/src/lib/libshell/common/tests/comvar.sh
+++ b/usr/src/lib/libshell/common/tests/comvar.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/coprocess.sh b/usr/src/lib/libshell/common/tests/coprocess.sh
index dde9a49805..f24697e55f 100644
--- a/usr/src/lib/libshell/common/tests/coprocess.sh
+++ b/usr/src/lib/libshell/common/tests/coprocess.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/cubetype.sh b/usr/src/lib/libshell/common/tests/cubetype.sh
index 4a718d4a38..2be2dc605d 100644
--- a/usr/src/lib/libshell/common/tests/cubetype.sh
+++ b/usr/src/lib/libshell/common/tests/cubetype.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/enum.sh b/usr/src/lib/libshell/common/tests/enum.sh
index 1929472bb5..b5e2aefa1a 100644
--- a/usr/src/lib/libshell/common/tests/enum.sh
+++ b/usr/src/lib/libshell/common/tests/enum.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/exit.sh b/usr/src/lib/libshell/common/tests/exit.sh
index a14b0dcbec..47e05aa6eb 100644
--- a/usr/src/lib/libshell/common/tests/exit.sh
+++ b/usr/src/lib/libshell/common/tests/exit.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/expand.sh b/usr/src/lib/libshell/common/tests/expand.sh
index c63e7eb3e2..69637f7617 100644
--- a/usr/src/lib/libshell/common/tests/expand.sh
+++ b/usr/src/lib/libshell/common/tests/expand.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/functions.sh b/usr/src/lib/libshell/common/tests/functions.sh
index 146b537743..5ee9d69015 100644
--- a/usr/src/lib/libshell/common/tests/functions.sh
+++ b/usr/src/lib/libshell/common/tests/functions.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -1068,4 +1068,29 @@ unset -f foo bar
[[ $(typeset +f) == *foo* ]] && err_exit 'function in subshell leaving side effects of function foo after reload'
[[ $(typeset +f) == *bar* ]] && err_exit 'function in subshell leaving side effects of function bar after reload'
+unset -f foo
+typeset -A bar
+function foo
+{
+ typeset -i bar[$1].x
+ bar[$1].x=5
+}
+foo sub
+[[ ${!bar[@]} == sub ]] || err_exit 'scoping problem with compound array variables'
+
+function A
+{
+ trap "> /dev/null;print TRAP A" EXIT
+ # (( stderr )) && print >&2
+}
+
+function B
+{
+ trap "> /dev/null;print TRAP B" EXIT
+ A
+}
+
+x=$(B)
+[[ $x == $'TRAP A\nTRAP B' ]] || err_exit "trap from funtions in subshells fails got" $x
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/glob.sh b/usr/src/lib/libshell/common/tests/glob.sh
index fa22291c96..e63efda318 100644
--- a/usr/src/lib/libshell/common/tests/glob.sh
+++ b/usr/src/lib/libshell/common/tests/glob.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/grep.sh b/usr/src/lib/libshell/common/tests/grep.sh
index 40a80a07a7..632c9eceea 100644
--- a/usr/src/lib/libshell/common/tests/grep.sh
+++ b/usr/src/lib/libshell/common/tests/grep.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/heredoc.sh b/usr/src/lib/libshell/common/tests/heredoc.sh
index 7b3c923bf0..cd68e697c7 100644
--- a/usr/src/lib/libshell/common/tests/heredoc.sh
+++ b/usr/src/lib/libshell/common/tests/heredoc.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/io.sh b/usr/src/lib/libshell/common/tests/io.sh
index 3468fe9429..3d8b8cbd34 100644
--- a/usr/src/lib/libshell/common/tests/io.sh
+++ b/usr/src/lib/libshell/common/tests/io.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -367,7 +367,7 @@ fi
read -t2 -n 1000 line3
read -t2 -n 1000 line4
}
-[[ $? == 0 ]] && err_exit 'should have time out'
+[[ $? == 0 ]] && err_exit 'should have timed out'
[[ $line1 == 'prompt1: ' ]] || err_exit "line1 should be 'prompt1: '"
[[ $line2 == line2 ]] || err_exit "line2 should be line2"
[[ $line3 == 'prompt2: ' ]] || err_exit "line3 should be 'prompt2: '"
diff --git a/usr/src/lib/libshell/common/tests/nameref.sh b/usr/src/lib/libshell/common/tests/nameref.sh
index 7bb9ec2c91..fe4bc2998b 100644
--- a/usr/src/lib/libshell/common/tests/nameref.sh
+++ b/usr/src/lib/libshell/common/tests/nameref.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/options.sh b/usr/src/lib/libshell/common/tests/options.sh
index cebb405a27..8584e726f0 100644
--- a/usr/src/lib/libshell/common/tests/options.sh
+++ b/usr/src/lib/libshell/common/tests/options.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/path.sh b/usr/src/lib/libshell/common/tests/path.sh
index edf7621663..e7d9d4f906 100644
--- a/usr/src/lib/libshell/common/tests/path.sh
+++ b/usr/src/lib/libshell/common/tests/path.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/pointtype.sh b/usr/src/lib/libshell/common/tests/pointtype.sh
index 28b60c499c..1f845f969e 100644
--- a/usr/src/lib/libshell/common/tests/pointtype.sh
+++ b/usr/src/lib/libshell/common/tests/pointtype.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/quoting.sh b/usr/src/lib/libshell/common/tests/quoting.sh
index a1df26a230..6f6b231630 100644
--- a/usr/src/lib/libshell/common/tests/quoting.sh
+++ b/usr/src/lib/libshell/common/tests/quoting.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/quoting2.sh b/usr/src/lib/libshell/common/tests/quoting2.sh
index dab0992f6b..5f40be2256 100644
--- a/usr/src/lib/libshell/common/tests/quoting2.sh
+++ b/usr/src/lib/libshell/common/tests/quoting2.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/recttype.sh b/usr/src/lib/libshell/common/tests/recttype.sh
index b2bca80f50..a1185c0831 100644
--- a/usr/src/lib/libshell/common/tests/recttype.sh
+++ b/usr/src/lib/libshell/common/tests/recttype.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/restricted.sh b/usr/src/lib/libshell/common/tests/restricted.sh
index eca93ce6f2..0306c443a6 100644
--- a/usr/src/lib/libshell/common/tests/restricted.sh
+++ b/usr/src/lib/libshell/common/tests/restricted.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/return.sh b/usr/src/lib/libshell/common/tests/return.sh
index c9bbf0f33c..90a9e8e832 100644
--- a/usr/src/lib/libshell/common/tests/return.sh
+++ b/usr/src/lib/libshell/common/tests/return.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/select.sh b/usr/src/lib/libshell/common/tests/select.sh
index 2728f85a40..136d87400b 100644
--- a/usr/src/lib/libshell/common/tests/select.sh
+++ b/usr/src/lib/libshell/common/tests/select.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/shtests b/usr/src/lib/libshell/common/tests/shtests
index 37a36c29ef..645d290574 100644
--- a/usr/src/lib/libshell/common/tests/shtests
+++ b/usr/src/lib/libshell/common/tests/shtests
@@ -9,7 +9,7 @@ LC_ALL=C
compile=1
script=1
time=1
-vmdebug=a
+vmalloc_options=abort
while :
do case $1 in
-a|--a*)compile=2
@@ -23,7 +23,7 @@ do case $1 in
;;
-t|--not*)time=
;;
- -v|--nov*)vmdebug=
+ -v|--nov*)vmalloc_options=
;;
-*) echo $0: $1: invalid option >&2
exit 2
@@ -38,14 +38,12 @@ do case $1 in
esac
shift
done
-if [[ ! $vmdebug ]]
-then unset VMDEBUG
-elif [[ $VMDEBUG ]]
-then vmdebug=$VMDEBUG
-else export VMDEBUG=$vmdebug
+if [[ $VMALLOC_OPTIONS ]]
+then vmalloc_options=$VMALLOC_OPTIONS
+else VMALLOC_OPTIONS=$vmalloc_options
fi
-[[ $VMDEBUG ]] || timesensitive=.
-export LANG LC_ALL PATH PWD SHELL
+[[ $VMALLOC_OPTIONS ]] || timesensitive=.
+export LANG LC_ALL PATH PWD SHELL VMALLOC_OPTIONS
PWD=`pwd`
SHELL=${SHELL-ksh}
case $0 in
@@ -79,7 +77,11 @@ then SHCOMP=${SHCOMP:-shcomp}
fi
typeset -A tests
for i in ${*-*.sh}
-do t=$(grep -c err_exit $i)
+do if [[ ! -r $i ]]
+ then echo $0: $i: not found >&2
+ continue
+ fi
+ t=$(grep -c err_exit $i)
if (( $t > 2 ))
then (( t = $t - 2 ))
fi
@@ -92,7 +94,7 @@ do t=$(grep -c err_exit $i)
if [[ $script ]]
then echo test $i begins ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"}
if [[ $i == $timesensitive ]]
- then unset VMDEBUG
+ then VMALLOC_OPTIONS=
fi
if $SHELL $i
then echo test $i passed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} "[ $t $T 0 ${E}s ]"
@@ -107,13 +109,16 @@ do t=$(grep -c err_exit $i)
echo test $i failed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T $e $E ]"
fi
if [[ $i == $timesensitive ]]
- then export VMDEBUG=$vmdebug
+ then VMALLOC_OPTIONS=$vmalloc_options
fi
fi
done
if [[ $compile ]]
then for i in ${*-*.sh}
- do t=${tests[$i]}
+ do if [[ ! -r $i ]]
+ then continue
+ fi
+ t=${tests[$i]}
T=test
if (( $t != 1 ))
then T=${T}s
@@ -124,7 +129,7 @@ then for i in ${*-*.sh}
E=error
if $SHCOMP $i > $tmp/$o
then if [[ $i == $timesensitive ]]
- then unset VMDEBUG
+ then VMALLOC_OPTIONS=
fi
if $SHELL $tmp/$o
then echo test $o passed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} "[ $t $T 0 ${E}s ]"
@@ -139,7 +144,7 @@ then for i in ${*-*.sh}
echo test $o failed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T $e $E ]"
fi
if [[ $i == $timesensitive ]]
- then export VMDEBUG=$vmdebug
+ then VMALLOC_OPTIONS=$vmalloc_options
fi
else e=$?
t=1
diff --git a/usr/src/lib/libshell/common/tests/sigchld.sh b/usr/src/lib/libshell/common/tests/sigchld.sh
index 0b2bf8e03f..f57ed6f5a7 100644
--- a/usr/src/lib/libshell/common/tests/sigchld.sh
+++ b/usr/src/lib/libshell/common/tests/sigchld.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -26,7 +26,7 @@ function err_exit
alias err_exit='err_exit $LINENO'
-float DELAY=${1:-0.5}
+float DELAY=${1:-0.2}
integer FOREGROUND=10 BACKGROUND=2 Errors=0
s=$($SHELL -c '
@@ -110,4 +110,30 @@ then
fi
+{
+got=$( ( sleep 1;print $'\n') | $SHELL -c 'function handler { : ;}
+ trap handler CHLD; sleep .3 & IFS= read; print good')
+} 2> /dev/null
+[[ $got == good ]] || err_exit 'SIGCLD handler effects read behavior'
+
+set -- $(
+ (
+ $SHELL -xc $'
+ trap \'wait $!; print $! $?\' CHLD
+ { sleep 0.1; exit 9; } &
+ print $!
+ sleep 0.5
+ '
+ ) 2>/dev/null; print $?
+)
+if (( $# != 4 ))
+then err_exit "CHLD trap failed -- expected 4 args, got $#"
+elif (( $4 != 0 ))
+then err_exit "CHLD trap failed -- exit code $4"
+elif (( $1 != $2 ))
+then err_exit "child pid mismatch -- got '$1' != '$2'"
+elif (( $3 != 9 ))
+then err_exit "child status mismatch -- expected '9', got '$3'"
+fi
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/signal.sh b/usr/src/lib/libshell/common/tests/signal.sh
index bab844fc4d..1538488c84 100644
--- a/usr/src/lib/libshell/common/tests/signal.sh
+++ b/usr/src/lib/libshell/common/tests/signal.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/statics.sh b/usr/src/lib/libshell/common/tests/statics.sh
index 21175c08db..ee13cbebba 100644
--- a/usr/src/lib/libshell/common/tests/statics.sh
+++ b/usr/src/lib/libshell/common/tests/statics.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/subshell.sh b/usr/src/lib/libshell/common/tests/subshell.sh
index bc63bde995..1a7794d7d3 100644
--- a/usr/src/lib/libshell/common/tests/subshell.sh
+++ b/usr/src/lib/libshell/common/tests/subshell.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -450,4 +450,23 @@ fi
$SHELL -c '( sleep 5 </dev/null >/dev/null 2>&1 & );exit 0' | cat
(( (SECONDS-t1) > 4 )) && err_exit 'sleep& in subshell hanging'
+exp=HOME=$HOME
+( HOME=/bin/sh )
+got=$(env | grep ^HOME=)
+[[ $got == "$exp" ]] || err_exit "( HOME=/bin/sh ) cleanup failed -- expected '$exp', got '$got'"
+
+cmd='echo $((case x in x)echo ok;esac);:)'
+exp=ok
+got=$($SHELL -c "$cmd" 2>&1)
+[[ $got == "$exp" ]] || err_exit "'$cmd' failed -- expected '$exp', got '$got'"
+
+cmd='eval "for i in 1 2; do eval /bin/echo x; done"'
+exp=$'x\nx'
+got=$($SHELL -c "$cmd")
+if [[ $got != "$exp" ]]
+then EXP=$(printf %q "$exp")
+ GOT=$(printf %q "$got")
+ err_exit "'$cmd' failed -- expected $EXP, got $GOT"
+fi
+
exit $Errors
diff --git a/usr/src/lib/libshell/common/tests/substring.sh b/usr/src/lib/libshell/common/tests/substring.sh
index 0d7fc384a7..d1dda6521f 100644
--- a/usr/src/lib/libshell/common/tests/substring.sh
+++ b/usr/src/lib/libshell/common/tests/substring.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh b/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh
index 45b3851f19..b2efb2c2a4 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -36,7 +35,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh b/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh
index e80111a538..9dd209cc74 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -34,7 +33,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh b/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh
index 69a7f1a6b9..4506698058 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -35,7 +34,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -99,6 +98,16 @@ function myintseq
return 0
}
+# quote input string but use single-backslash that "err_exit" prints
+# the strings correctly
+function singlebackslashquote
+{
+ typeset s
+ s="$(printf "%q\n" "$1")"
+ print -r "$s"
+ return 0
+}
+
# quote input string but use double-backslash that "err_exit" prints
# the strings correctly
function doublebackslashquote
@@ -121,9 +130,9 @@ typeset tmpdir
# create temporary test directory
ocwd="$PWD"
-tmpdir="$(mktemp -d "test_sun_solaris_builtin_tail.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+tmpdir="$(mktemp -t -d "test_sun_solaris_builtin_tail.XXXXXXXX")" || err_exit "Cannot create temporary directory"
-cd "${tmpdir}" || err_exit "cd ${tmpdir} failed."
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
# run tests:
@@ -282,8 +291,8 @@ for testid in "${!testcases[@]}" ; do
for argv_variants in "${!tc.tail_args[@]}" ; do
nameref argv=tc.tail_args[${argv_variants}].argv
output=$(
- #set -o pipefail
- print -r -- "${tc.input}" | tail "${argv[@]}"
+ set -o pipefail
+ (trap "" PIPE ; print -r -- "${tc.input}") | tail "${argv[@]}"
) || err_exit "test ${tc.name}/${argv_variants}: command failed with exit code $?"
[[ "${output}" == "${tc.expected_output}" ]] || err_exit "test ${tc.name}/${argv_variants}: Expected $(doublebackslashquote "${tc.expected_output}"), got $(doublebackslashquote "${output}")"
@@ -412,8 +421,8 @@ function followtest1
[[ "$( < "${OUTFILE}")" == "${followstr}" ]] || err_exit "${title}: Expected $(doublebackslashquote "${followstr}"), got "$(doublebackslashquote "$( < "${OUTFILE}")")""
done
- #kill -TERM ${tailchild} 2>/dev/null
kill -KILL ${tailchild} 2>/dev/null
+ #kill -TERM ${tailchild} 2>/dev/null
waitpidtimeout ${tailchild} 5
if isvalidpid ${tailchild} ; then
@@ -437,6 +446,51 @@ followtest1 "test5a" "tail" true
#followtest1 "test5f" "/usr/bin/tail" false
+# test 6: "tail -f" tests
+function followtest2
+{
+ typeset -r FOLLOWFILE="followfile.txt"
+ typeset -r OUTFILE="outfile.txt"
+
+ typeset title="$1"
+ typeset testcmd="$2"
+ integer tailchild=-1
+
+ rm -f "${FOLLOWFILE}" "${OUTFILE}"
+
+ myintseq 50000 >"${FOLLOWFILE}"
+
+ ${testcmd} -n 60000 -f "${FOLLOWFILE}" >"${OUTFILE}" &
+ (( tailchild=$! ))
+
+ sleep 10
+
+ kill -KILL ${tailchild} 2>/dev/null
+ #kill -TERM ${tailchild} 2>/dev/null
+ waitpidtimeout ${tailchild} 5
+
+ if isvalidpid ${tailchild} ; then
+ err_exit "${title}: tail pid=${tailchild} hung."
+ kill -KILL ${tailchild} 2>/dev/null
+ fi
+
+ wait ${tailchild} 2>/dev/null
+
+ # this tail should be an external process
+ outstr=$(/usr/bin/tail "${OUTFILE}") || err_exit "tail returned non-zero exit code $?"
+ [[ "${outstr}" == 49991*50000 ]] || err_exit "${title}: Expected match for 49991*50000, got "$(singlebackslashquote "${outstr}")""
+
+ rm -f "${FOLLOWFILE}" "${OUTFILE}"
+
+ return 0
+}
+
+followtest2 "test6a" "tail"
+followtest2 "test6b" "/usr/xpg4/bin/tail"
+# fixme: later we should test this, too:
+#followtest2 "test6c" "/usr/bin/tail"
+
+
# cleanup
cd "${ocwd}"
rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh b/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh
index 77ab14714e..468b533900 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -33,7 +32,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -58,7 +57,7 @@ integer testid
# (Please keep this test syncted with sun_solaris_cr_6800929_large_command_substitution_hang.sh)
# test 1: run loop and check various temp filesizes
-tmpfile="$(mktemp "/tmp/ksh93_tests_command_substitution.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
+tmpfile="$(mktemp -t "ksh93_tests_command_substitution.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
compound test1=(
compound -a testcases=(
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh b/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh
new file mode 100644
index 0000000000..96009acafc
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh
@@ -0,0 +1,163 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test module contains misc compound tests which do not have
+# their own module yet.
+#
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+# global utility functions
+compound bracketstat=(
+ integer bopen=0
+ integer bclose=0
+)
+
+function count_brackets
+{
+ typeset x="$1"
+ typeset c
+
+ integer i
+ (( bracketstat.bopen=0 , bracketstat.bclose=0 ))
+
+ for (( i=0 ; i < ${#x} ; i++ )) ; do
+ c="${x:i:1}"
+ [[ "$c" == "(" ]] && (( bracketstat.bopen++ ))
+ [[ "$c" == ")" ]] && (( bracketstat.bclose++ ))
+ done
+
+ (( bracketstat.bopen != bracketstat.bclose )) && return 1
+
+ return 0
+}
+
+
+typeset ocwd
+typeset tmpdir
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_compound_misc.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+# ksh93 <= ast-ksh.2010-03-09 prints garbage for compound x=( compound -a nodes=( [4]=( ) ) );typeset -p x
+function test_compound_indexed_array_init_1
+{
+ compound vx=( compound -a nodes=( [4]=( ) ) )
+ compound vy
+ compound -a vy.nodes=( [4]=( ) )
+ compound vz
+ compound -a vz.nodes
+ vz.nodes[4]=( )
+
+ cx="$(typeset -p vx)" ; cx="${cx//vx/tt}"
+ cy="$(typeset -p vy)" ; cy="${cy//vy/tt}"
+ cz="$(typeset -p vz)" ; cz="${cz//vz/tt}"
+ [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'"
+ [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'"
+ [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'"
+
+ count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'"
+ count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'"
+ count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'"
+ count_brackets "$(print -v vx)" || err_exit "Brackets not balanced for '$(print -v vx)'"
+ count_brackets "$(print -v vy)" || err_exit "Brackets not balanced for '$(print -v vy)'"
+ count_brackets "$(print -v vz)" || err_exit "Brackets not balanced for '$(print -v vz)'"
+ count_brackets "$(print -C vx)" || err_exit "Brackets not balanced for '$(print -C vx)'"
+ count_brackets "$(print -C vy)" || err_exit "Brackets not balanced for '$(print -C vy)'"
+ count_brackets "$(print -C vz)" || err_exit "Brackets not balanced for '$(print -C vz)'"
+
+ cx="$(typeset +p vx.nodes)" ; [[ "$cx" == *-C* && "$cx" == *-a* ]] || err_exit "'$cx' lacks -C/-a attribute"
+ cy="$(typeset +p vy.nodes)" ; [[ "$cy" == *-C* && "$cy" == *-a* ]] || err_exit "'$cy' lacks -C/-a attribute"
+ cz="$(typeset +p vz.nodes)" ; [[ "$cz" == *-C* && "$cz" == *-a* ]] || err_exit "'$cz' lacks -C/-a attribute"
+ cx="$(typeset +p vx.nodes[4])" ; [[ "$cx" == *-C* ]] || err_exit "'$cx' lacks -C attribute"
+ cy="$(typeset +p vy.nodes[4])" ; [[ "$cy" == *-C* ]] || err_exit "'$cy' lacks -C attribute"
+ cz="$(typeset +p vz.nodes[4])" ; [[ "$cz" == *-C* ]] || err_exit "'$cz' lacks -C attribute"
+
+ return 0
+}
+
+# ksh93 <= ast-ksh.2010-03-09 prints garbage for compound x=( compound -a nodes=( [4]=( ) ) );typeset -p x
+# this test is the same as test_compound_indexed_array_init_1 but "-a" was replaced with "-A"
+function test_compound_associative_array_init_1
+{
+ compound vx=( compound -A nodes=( [4]=( ) ) )
+ compound vy
+ compound -A vy.nodes=( [4]=( ) )
+ compound vz
+ compound -A vz.nodes
+ vz.nodes[4]=( )
+
+ cx="$(typeset -p vx)" ; cx="${cx//vx/tt}"
+ cy="$(typeset -p vy)" ; cy="${cy//vy/tt}"
+ cz="$(typeset -p vz)" ; cz="${cz//vz/tt}"
+ [[ "$cx" == "$cy" ]] || err_exit "'$cx' != '$cy'"
+ [[ "$cx" == "$cz" ]] || err_exit "'$cx' != '$cz'"
+ [[ "$cy" == "$cz" ]] || err_exit "'$cy' != '$cz'"
+
+ count_brackets "$cx" || err_exit "Brackets not balanced for '$cx'"
+ count_brackets "$cy" || err_exit "Brackets not balanced for '$cy'"
+ count_brackets "$cz" || err_exit "Brackets not balanced for '$cz'"
+ count_brackets "$(print -v vx)" || err_exit "Brackets not balanced for '$(print -v vx)'"
+ count_brackets "$(print -v vy)" || err_exit "Brackets not balanced for '$(print -v vy)'"
+ count_brackets "$(print -v vz)" || err_exit "Brackets not balanced for '$(print -v vz)'"
+ count_brackets "$(print -C vx)" || err_exit "Brackets not balanced for '$(print -C vx)'"
+ count_brackets "$(print -C vy)" || err_exit "Brackets not balanced for '$(print -C vy)'"
+ count_brackets "$(print -C vz)" || err_exit "Brackets not balanced for '$(print -C vz)'"
+
+ cx="$(typeset +p vx.nodes)" ; [[ "$cx" == *-C* && "$cx" == *-A* ]] || err_exit "'$cx' lacks -C/-A attribute"
+ cy="$(typeset +p vy.nodes)" ; [[ "$cy" == *-C* && "$cy" == *-A* ]] || err_exit "'$cy' lacks -C/-A attribute"
+ cz="$(typeset +p vz.nodes)" ; [[ "$cz" == *-C* && "$cz" == *-A* ]] || err_exit "'$cz' lacks -C/-A attribute"
+ cx="$(typeset +p vx.nodes[4])" ; [[ "$cx" == *-C* ]] || err_exit "'$cx' lacks -C attribute"
+ cy="$(typeset +p vy.nodes[4])" ; [[ "$cy" == *-C* ]] || err_exit "'$cy' lacks -C attribute"
+ cz="$(typeset +p vz.nodes[4])" ; [[ "$cz" == *-C* ]] || err_exit "'$cz' lacks -C attribute"
+
+ return 0
+}
+
+# run tests
+test_compound_indexed_array_init_1
+test_compound_associative_array_init_1
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh b/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh
index 3714227449..59ad028af8 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
@@ -31,7 +30,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh b/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh
index 52bc5dca82..b36d07e7ee 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# test setup
@@ -29,7 +28,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
index 27cac4aa88..a5d14f9fce 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -51,7 +50,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
index 28a84caff1..08568ae179 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -56,7 +55,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
index 793d53d20d..6da73f9d7e 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -45,7 +44,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
index fa016f4c67..d6407c9ae0 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -45,7 +44,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
index 6b0092d5ba..d6da9e99a4 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -50,7 +49,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
index bc3426f063..cd9342ddd9 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -68,7 +67,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
index 7463baea5a..606a8b6585 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -75,7 +74,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
index 7f76862bdd..fbe90c29cf 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -81,7 +80,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
index 2dd0fc997f..d18a8c1513 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -62,7 +61,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
index 24f99cb581..d8e4107835 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -50,7 +49,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
index 69159a9f76..17bede815e 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -89,7 +88,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
index de745b8a3a..b808ef17b3 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -83,7 +82,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -103,7 +102,7 @@ integer testid
# test 1: run loop and check various temp filesizes
-tmpfile="$(mktemp "/tmp/sun_solaris_cr_6800929_large_command_substitution_hang.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
+tmpfile="$(mktemp -t "sun_solaris_cr_6800929_large_command_substitution_hang.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
compound -a testcases=(
# test 1a: Run test child for $(...)
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
index 4f774b2f8b..ca8f832d1a 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -84,7 +83,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
index bbcb9b168d..4176b62015 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -78,7 +77,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
index 1dccc97505..b0390a24ab 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -64,7 +63,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
index 3e65edbfae..79b0c24f85 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -51,7 +50,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -61,7 +60,7 @@ integer Errors=0
typeset tmpfile
-tmpfile="$(mktemp "/tmp/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
+tmpfile="$(mktemp -t "sun_solaris_cr_6807179_shellpattern_uses_getpwnam.${PPID}.$$.XXXXXX")" || err_exit "Cannot create temporary file."
rm -f "${tmpfile}"
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
index dc91bbeb82..6945b64985 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -81,7 +80,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
index 396816960a..13dff15526 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -61,7 +60,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
index 22de05b56c..fa3f32da1b 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -85,7 +84,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
index 568b43f35d..90008a5c44 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -68,7 +67,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -82,9 +81,9 @@ typeset out
# create temporary test directory
ocwd="$PWD"
-tmpdir="$(mktemp -d "test_sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.XXXXXXXX")" || err_exit "Cannot create temporary directory"
-cd "${tmpdir}" || err_exit "cd ${tmpdir} failed."
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
# run tests
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
index a5aae41ce5..c4a16ad646 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -58,7 +57,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh
new file mode 100644
index 0000000000..f302f6379e
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh
@@ -0,0 +1,183 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test checks whether the return code of a child process
+# is reported properly.
+#
+# This was reported as CR #6887363 ("Korn shell 93 sometimes
+# mishandles return value of its child process"):
+# ------------ snip ------------
+# Following construction sometimes ends with wrong return value.
+#
+# 56 echo $op | grep rand 2>&1 >/dev/null
+# 57 if [ $? = 0 ]; then
+# 58 randseq="rand${SEED}"
+# 59 else
+# 60 randseq="seq"
+# 61 fi
+#
+# Sometimes, the given result is "rand..." even when there is
+# no "rand" word in $op. This can be demonstrated with
+# TSufs/SnapShots/Func test case which excercises shown code
+# quite often.
+#
+# As it happens only sometimes, I suppose there is an
+# race-condition in handling return value from a child process.
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+# print test case from bug that ksh93 can read this script via stdin
+function cat_test
+{
+cat <<EOF
+#!/bin/sh
+#
+# Test derived from Sun's SnapShots Functional Suite
+#
+
+export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin
+
+# WARNING: make sure "expr" and "grep" are _external_ commands in this test
+
+# start test
+_pcnt=0
+
+PASS(){
+ _pcnt=\`/usr/bin/expr \$_pcnt + 1\`
+ true
+}
+
+doblockstamper() {
+ output=\`/usr/bin/sleep .01\`
+ _status=\$?
+
+ PASS "Here I am"
+}
+
+lotsaFiles() {
+ OPS="read-seq read-rand syncread-seq syncread-seq"
+ echo \$OPS
+ for op in \$OPS; do
+ echo \$op
+ echo \$op | /usr/bin/grep rand 2>&1 >/dev/null
+ status=\$?
+ if [ \$status = 0 ]; then
+ randseq="rand"
+ phrase="read-rand"
+ else
+ randseq="seq"
+ phrase="read-seq"
+ fi
+ retcode=\$status
+
+ echo \$op | /usr/bin/grep sync 2>&1 >/dev/null
+ status=\$?
+ if [ \$status = 0 ]; then
+ syncasync="sync"
+ phrase="sync\$phrase"
+ else
+ syncasync="async"
+ fi
+ retcode=\${status}-\${retcode}
+
+ if [ "\$op" != "\$phrase" ]; then
+ echo "Bad mode: \$op != \$phrase (\$retcode)"
+ exit 2
+ fi
+
+ for sz in 1 2 3 4; do
+ for type in 1 2 3 4; do
+ PASS "Something"
+ doblockstamper &
+ done
+ wait # Let a few finish
+ done
+ done
+
+ wait # Make sure everyone got done
+
+ PASS "lotsafiles \$1 \$fill"
+}
+
+cycle=0
+while [ cycle -lt 24 ]; do
+ cycle=\`/usr/bin/expr \$cycle + 1\`
+
+ lotsaFiles write
+ lotsaFiles write
+ lotsaFiles write
+
+ lotsaFiles read
+ lotsaFiles read
+ lotsaFiles read
+
+ PASS "Cycle"
+done
+exit 0
+EOF
+}
+
+# FIXME: we reset the VMALLOC_OPTIONS (and the depreciated VMDEBUG (for now)) variable for the run to avoid
+# that the test may run for hours. This may require re-investigation why this happens.
+out="$(unset VMALLOC_OPTIONS VMDEBUG ; cat_test | ${SHELL} 2>&1)" || err_exit "Unexpected exit code $?"
+[[ "${out}" != "" ]] || err_exit "No output from test"
+
+# filter output and check it
+out2="$(/usr/xpg4/bin/egrep -v '^((read-seq|read-rand|syncread-seq|syncread-seq)[[:space:][:blank:]]*)*$' <<<"${out}")"
+[[ "${out2}" == "" ]] || err_exit "Unexpected output '${out2}'"
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh
new file mode 100644
index 0000000000..aa8cd9f862
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh
@@ -0,0 +1,174 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test checks whether "wc" builtin counts the number of bytes
+# and multibyte characters in different locales correctly.
+#
+# This was reported as CR #6904557 ("wc no longer counts number of
+# bytes correctly"):
+# ------------ snip ------------
+# wc no longer count bytes.
+#
+# $ echo $LANG
+# en_US.UTF-8
+# $ ls -l mb.utf8
+# -rw-r--r-- 1 nakanon staff 7 Nov 2 14:06 mb.utf8
+# $ wc mb.utf8
+# 1 1 4 mb.utf8
+# $
+#
+# mb.utf8 is attached.
+#
+# Man page says:
+#
+# If no option is specified, the default is -lwc (counts
+# lines, words, and bytes.)
+#
+# SUS says:
+# http://www.opengroup.org/onlinepubs/000095399/utilities/wc.html
+#
+# By default, the standard output shall contain an entry for each
+# input file of the form:
+#
+# "%d %d %d %s\n", <newlines>, <words>, <bytes>, <file>
+#
+# If the -m option is specified, the number of characters shall
+# replace the <bytes> field in this format.
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+function test1
+{
+ typeset wc_cmd="$1"
+ typeset testid
+ typeset out
+ typeset testname
+ compound saved_locale
+
+ # save locale information
+ [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}"
+ [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}"
+ [[ -v LANG ]] && saved_locale.LANG="${LANG}"
+
+ compound -r -a testcases=(
+ (
+ typeset name="unicode_plain"
+ typeset locale="<unicode>"
+ typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a'
+ typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7'
+ typeset -a wc_args=( )
+ )
+ (
+ typeset name="unicode_clw"
+ typeset locale="<unicode>"
+ typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a'
+ typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7'
+ typeset -a wc_args=( "-c" "-l" "-w" )
+ )
+ (
+ typeset name="unicode_widechars_lines_words"
+ typeset locale="<unicode>"
+ typeset input_format='\xc3\xa1\xc3\xa2\xc3\xa3\x0a'
+ typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*4'
+ typeset -a wc_args=( "-C" "-l" "-w" )
+ )
+ (
+ typeset name="ja_JP.eucJP_plain"
+ typeset locale="ja_JP.eucJP"
+ typeset input_format='\x74\x32\xa1\xf7\x66\x31\x0a'
+ typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*7'
+ typeset -a wc_args=( )
+ )
+ (
+ typeset name="ja_JP.eucJP_widechars_lines_words"
+ typeset locale="ja_JP.eucJP"
+ typeset input_format='\x74\x32\xa1\xf7\x66\x31\x0a'
+ typeset output_pattern='~(Elr)[[:space:][:blank:]]*1[[:space:][:blank:]]*1[[:space:][:blank:]]*6'
+ typeset -a wc_args=( "-C" "-l" "-w" )
+ )
+ )
+
+ for testid in "${!testcases[@]}" ; do
+ nameref tc=testcases[${testid}]
+ testname="${wc_cmd}/${tc.name}"
+
+ if [[ "${tc.locale}" == "<unicode>" ]] ; then
+ if [[ "$LC_ALL" != *.UTF-8 ]] ; then
+ export LC_ALL='en_US.UTF-8'
+ fi
+ else
+ export LC_ALL="${tc.locale}"
+ fi
+
+ out="$(printf "${tc.input_format}" | ${SHELL} -c "${wc_cmd} \"\$@\"" dummy "${tc.wc_args[@]}" 2>&1)" || err_exit "${testname}: Command returned exit code $?"
+ [[ "${out}" == ${tc.output_pattern} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${tc.output_pattern}"), got $(printf "%q\n" "${out}")"
+
+ # restore locale settings
+ [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL
+ [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE
+ [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG
+ done
+
+ return 0
+}
+
+#for cmd in "wc" "/usr/bin/wc" ; do
+for cmd in "wc" ; do
+ test1 "${cmd}"
+done
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh
new file mode 100644
index 0000000000..c657a07899
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh
@@ -0,0 +1,193 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test checks whether the AST "cut" utility's "-d" option
+# works with multibyte characters
+#
+# This was reported as CR #6904575 ("cut -d with multibyte character no longer works"):
+# ------------ snip ------------
+# cut -d with multibyte char no longer work correctly.
+#
+# $ echo $LANG
+# ja
+# $ od -tx1 mb.eucjp
+# 0000000 a4 a2 a4 a4 a4 a4 a4 a6 a4 a8 0a
+# 0000013
+# $ od -tx1 delim
+# 0000000 a4 a4 0a
+# 0000003
+# $ wc -m mb.eucjp
+# 6 mb.eucjp
+#
+# It has 5 characters (2byte each).
+#
+# $ /usr/bin/cut -d `cat delim` -f1 mb.eucjp | od -tx1
+# 0000000 0a
+# 0000001
+#
+# correct output is
+#
+# 0000000 a4 a2 0a
+# 0000003
+#
+# files are attached.
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+
+function test1
+{
+ typeset cut_cmd="$1"
+ typeset testid
+ typeset out
+ typeset testname
+ compound saved_locale
+
+ # save locale information
+ [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}"
+ [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}"
+ [[ -v LANG ]] && saved_locale.LANG="${LANG}"
+
+ compound -r -a testcases=(
+ (
+ typeset name="ascii_plain"
+ typeset locale="C"
+ typeset input_format='abcdefg'
+ typeset -a cut_args_format=( "-f1" "-d" "e" )
+ typeset output_format='abcd'
+ )
+ (
+ typeset name="unicode_plain"
+ typeset locale="<unicode>"
+ typeset input_format='abcd\u[20ac]fg'
+ typeset -a cut_args_format=( '-f1' '-d' '\u[20ac]' )
+ typeset output_format='abcd'
+ )
+ (
+ typeset name="unicode_plain2"
+ typeset locale="<unicode>"
+ typeset input_format='abcd\u[20ac]fg'
+ typeset -a cut_args_format=( '-f1' '-d' 'f' )
+ typeset output_format='abcd\u[20ac]'
+ )
+ )
+
+ for testid in "${!testcases[@]}" ; do
+ nameref tc=testcases[${testid}]
+ testname="${cut_cmd}/${tc.name}"
+
+ if [[ "${tc.locale}" == "<unicode>" ]] ; then
+ if [[ "$LC_ALL" != *.UTF-8 ]] ; then
+ export LC_ALL='en_US.UTF-8'
+ fi
+ else
+ export LC_ALL="${tc.locale}"
+ fi
+
+ # build "cut_args" array with multibyte characters in the current locale
+ typeset -a cut_args
+ integer arg_index
+ for arg_index in "${!tc.cut_args_format[@]}" ; do
+ cut_args+=( "$( printf -- "${tc.cut_args_format[arg_index]}" )" )
+ done
+
+ typeset output_format="$( printf -- "${tc.output_format}" )"
+
+ #printf "args=|%q|\n" "${cut_args[@]}"
+
+ out="$(printf "${tc.input_format}" | ${SHELL} -c "${cut_cmd} \"\$@\"" dummy "${cut_args[@]}" 2>&1)" || err_exit "${testname}: Command returned exit code $?"
+ [[ "${out}" == ${output_format} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${output_format}"), got $(printf "%q\n" "${out}")"
+
+ # cleanup and restore locale settings
+ unset cut_args arg_index
+ [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL
+ [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE
+ [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG
+ done
+
+ return 0
+}
+
+
+function test2
+{
+ typeset cutcmd=$1
+ typeset testname="${cutcmd}"
+ typeset out
+
+ # create files
+ printf "\xa4\xa2\xa4\xa4\xa4\xa4\xa4\xa6\xa4\xa8\x0a" >"mb.eucjp"
+ printf "\xa4\xa4\x0a" >"delim"
+
+ # run test
+ out=$( LC_ALL=ja_JP.eucJP ${SHELL} -o pipefail -o errexit -c '$1 -d $(cat delim) -f1 "mb.eucjp" | od -tx1' dummy "${cutcmd}" 2>&1 ) || err_exit "${testname}: Test failed with exit code $?"
+ [[ "${out}" == $'0000000 a4 a2 0a\n0000003' ]] || err_exit "${testname}: Expected \$'0000000 a4 a2 0a\n0000003', got $(printf "%q\n" "${out}")"
+
+ # cleanup
+ rm "mb.eucjp" "delim"
+
+ return 0
+}
+
+#for cmd in "/usr/bin/cut" "cut" ; do
+for cmd in "cut" ; do
+ test1 "${cmd}"
+ test2 "${cmd}"
+done
+
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh
new file mode 100644
index 0000000000..4a7da66794
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh
@@ -0,0 +1,190 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test checks whether the AST "join" utility works with
+# multibyte characters as seperator.
+#
+# This was reported as CR #6904878 ("join -t no longer works with multibyte char separator"):
+# ------------ snip ------------
+# join doesn't handle multibyte separator correctly.
+#
+# $ echo $LANG
+# ja
+# $ od -tx1 input1
+# 0000000 66 31 a1 f7 66 32 0a
+# 0000007
+# $ od -tx1 input2
+# 0000000 74 32 a1 f7 66 31 0a
+# 0000007
+# # 0xa1 0xf7 in the file is multibyte character.
+# $ od -tx1 delim
+# 0000000 a1 f7 0a
+# 0000003
+#
+# $ /usr/bin/join -j1 1 -j2 2 -o 1.1 -t `cat delim` input1 input2
+# $
+#
+# It should output "f1".
+#
+# files are attached.
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+
+function test1
+{
+ typeset join_cmd="$1"
+ typeset testid
+ typeset out
+ typeset testname
+ compound saved_locale
+
+ # save locale information
+ [[ -v LC_ALL ]] && saved_locale.LC_ALL="${LC_ALL}"
+ [[ -v LC_CTYPE ]] && saved_locale.LC_CTYPE="${LC_CTYPE}"
+ [[ -v LANG ]] && saved_locale.LANG="${LANG}"
+
+ compound -r -a testcases=(
+ (
+ typeset name="ascii_simple"
+ typeset locale="C"
+ typeset input1_format="fish 81 91\n"
+ typeset input2_format="fish B A\n"
+ typeset -a join_args_format=( "input1" "input2" )
+ typeset output_format="fish 81 91 B A"
+ )
+ (
+ typeset name="ja_JP.eucJP_multibyte_delimiter"
+ typeset locale="ja_JP.eucJP"
+ typeset input1_format="\x66\x31\xa1\xf7\x66\x32\x0a"
+ typeset input2_format="\x74\x32\xa1\xf7\x66\x31\x0a"
+ typeset -a join_args_format=( "-j1" "1" "-j2" "2" "-o" "1.1" "-t" "\xa1\xf7" "input1" "input2" )
+ typeset output_format="f1"
+ )
+ )
+
+ for testid in "${!testcases[@]}" ; do
+ nameref tc=testcases[${testid}]
+ testname="${join_cmd}/${tc.name}"
+
+ if [[ "${tc.locale}" == "<unicode>" ]] ; then
+ if [[ "$LC_ALL" != *.UTF-8 ]] ; then
+ export LC_ALL='en_US.UTF-8'
+ fi
+ else
+ export LC_ALL="${tc.locale}"
+ fi
+
+ # build "join_args" array with multibyte characters in the current locale
+ typeset -a join_args
+ integer arg_index
+ for arg_index in "${!tc.join_args_format[@]}" ; do
+ join_args+=( "$( printf -- "${tc.join_args_format[arg_index]}" )" )
+ done
+
+ typeset output_format="$( printf -- "${tc.output_format}" )"
+
+ #printf "args=|%q|\n" "${join_args[@]}"
+
+ printf "${tc.input1_format}" >"input1"
+ printf "${tc.input2_format}" >"input2"
+
+ out="$(${SHELL} -c "${join_cmd} \"\$@\"" dummy "${join_args[@]}" 2>&1)" || err_exit "${testname}: Command returned exit code $?"
+ [[ "${out}" == ${output_format} ]] || err_exit "${testname}: Expected match for $(printf "%q\n" "${output_format}"), got $(printf "%q\n" "${out}")"
+
+ rm "input1" "input2"
+
+ # cleanup and restore locale settings
+ unset join_args arg_index
+ [[ -v saved_locale.LC_ALL ]] && LC_ALL="${saved_locale.LC_ALL}" || unset LC_ALL
+ [[ -v saved_locale.LC_CTYPE ]] && LC_CTYPE="${saved_locale.LC_CTYPE}" || unset LC_CTYPE
+ [[ -v saved_locale.LANG ]] && LANG="${saved_locale.LANG}" || unset LANG
+ done
+
+ return 0
+}
+
+
+function test2
+{
+ typeset joincmd=$1
+ typeset testname="${joincmd}"
+ typeset out
+
+ # create files
+ printf "\x66\x31\xa1\xf7\x66\x32\x0a" >"input1"
+ printf "\x74\x32\xa1\xf7\x66\x31\x0a" >"input2"
+ printf "\xa1\xf7\x0a" >"delim"
+
+ # run test
+ out=$( LC_ALL=ja_JP.eucJP ${SHELL} -o pipefail -o errexit -c '$1 -j1 1 -j2 2 -o 1.1 -t $(cat delim) input1 input2' dummy "${joincmd}" 2>&1 ) || err_exit "${testname}: Test failed with exit code $?"
+ [[ "${out}" == 'f1' ]] || err_exit "${testname}: Expected 'f1', got $(printf "%q\n" "${out}")"
+
+ # cleanup
+ rm "input1" "input2" "delim"
+
+ return 0
+}
+
+#for cmd in "/usr/bin/join" "join" ; do
+for cmd in "join" ; do
+ test1 "${cmd}"
+ test2 "${cmd}"
+done
+
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh
new file mode 100644
index 0000000000..b9240e5f32
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh
@@ -0,0 +1,221 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test checks whether the EXIT trap is called correctly in subshells
+#
+# This was reported as CR #6907460 ("EXIT trap handlers are sometimes executed twice"):
+# ------------ snip ------------
+# During SST testing of snv_128(RE) we found out that ksh93 executes EXIT
+# trap handlers twice under some circumstances.
+#
+# Here is a test script:
+# ---
+# #!/bin/ksh93 -x
+#
+# function A
+# {
+# set -x
+# trap "print TRAP A >>log" EXIT
+# print >&2
+# }
+#
+# function B
+# {
+# set -x
+# trap "print TRAP B >>log" EXIT
+# A
+# }
+#
+# rm -f log
+# x=$(B)
+# ---
+#
+# It produces the following output on snv_128:
+# ---
+# + rm -f log
+# + B
+# + trap 'print TRAP B >>log' EXIT
+# + A
+# + trap 'print TRAP A >>log' EXIT
+# + print
+# + + print TRAP A
+# 1>& 2
+# + 1>> log
+# + print TRAP B
+#
+# + 1>> log
+# + print TRAP A
+# + 1>> log
+# + print TRAP B
+# + 1>> log
+# + x=''
+# ---
+#
+# The log file then contains:
+# TRAP A
+# TRAP B
+# TRAP A
+# TRAP B
+#
+# However, the expected log would be:
+# TRAP A
+# TRAP B
+#
+# When the "x=$(B)" line is changed to "B", the log is correct:
+# TRAP A
+# TRAP B
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+# test 1: Run test with some variations
+compound vari
+typeset testname
+
+for vari.shell_options in \
+ "" \
+ "-o xtrace" \
+ "-o errexit" \
+ "-o errexit -o xtrace" ; do
+ for vari.xtrace1 in \
+ "" \
+ "set -x" ; do
+ for vari.xtrace2 in \
+ "" \
+ "set -x" ; do
+ for vari.func_A_end in \
+ "" \
+ "print >&2" \
+ "return 0" \
+ "print >&2 ; return 0" ; do
+ for vari.subshell in \
+ $'x=$(B)' \
+ $'x=$( ( B ) )' \
+ $'x=${ B ; }' \
+ $'x=${ ( B ) ; }' \
+ $'( x=$(B) )' \
+ $'( x=$( ( B ) ) )' \
+ $'( x=${ B ; } )' \
+ $'( x=${ ( B ) ; } )' ; do
+ testname="$( printf "test |%#B|\n" vari )"
+
+cat >"testscript.sh" <<EOF
+ function A
+ {
+ ${vari.xtrace1}
+ trap "print TRAP A >>log" EXIT
+ ${vari.func_A_end}
+ }
+
+ function B
+ {
+ ${vari.xtrace2}
+ trap "print TRAP B >>log" EXIT
+ A
+ }
+
+ rm -f log
+ ${vari.subshell}
+EOF
+ ${SHELL} ${vari.shell_options} "testscript.sh" >/dev/null 2>&1 || err_exit "${testname}: Unexpected error code $?"
+ rm "testscript.sh"
+
+ if [[ -f "log" ]] ; then
+ out="$( < log )"
+ rm "log"
+ else
+ err_exit "${testname}: File 'log' not found."
+ fi
+ [[ "${out}" == $'TRAP A\nTRAP B' ]] || err_exit "${testname}: Expected \$'TRAP A\nTRAP B', got $(printf "%q\n" "${out}")"
+ done
+ done
+ done
+ done
+done
+
+
+
+# test 2: This is the unmodified test from the bugster bug report
+(
+cat <<EOF
+ function A
+ {
+ set -x
+ trap "print TRAP A >>log" EXIT
+ print >&2
+ }
+
+ function B
+ {
+ set -x
+ trap "print TRAP B >>log" EXIT
+ A
+ }
+
+ rm -f log
+ x=\$(B)
+EOF
+) | ${SHELL} >/dev/null 2>&1 || err_exit "Unexpected error code $?"
+
+if [[ -f "log" ]] ; then
+ out="$( < log )"
+ rm "log"
+else
+ err_exit "File 'log' not found."
+fi
+[[ "${out}" == $'TRAP A\nTRAP B' ]] || err_exit "Expected \$'TRAP A\nTRAP B', got $(printf "%q\n" "${out}")"
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh b/usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh
new file mode 100644
index 0000000000..b1c40f22f5
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh
@@ -0,0 +1,66 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# <short summary>
+#
+# This was reported as CR #xxxxxxxx ("<title>"):
+# ------------ snip ------------
+# <description>
+# ------------ snip ------------
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+typeset out
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_<description>.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+
+# run tests
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh b/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh
index 8e1e2ab937..2b1243c5c0 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -34,7 +33,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh b/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh
new file mode 100644
index 0000000000..bb3314fe49
--- /dev/null
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh
@@ -0,0 +1,188 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# This test module contains misc l10n tests
+#
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors < 127 && Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+typeset ocwd
+typeset tmpdir
+
+# create temporary test directory
+ocwd="$PWD"
+tmpdir="$(mktemp -t -d "test_sun_solaris_locale_misc.XXXXXXXX")" || err_exit "Cannot create temporary directory"
+
+cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
+
+#
+# utility functions
+#
+
+function string_has_multibyte_characters
+{
+ typeset str="$1"
+ integer bytecount
+ integer mbcharactercount
+
+ (( mbcharactercount=$(LC_ALL="en_US.UTF-8" wc -C <<<"${str}") ))
+ (( bytecount=$(wc -c <<<"${str}") ))
+
+ (( bytecount != mbcharactercount )) && return 0
+ return 1
+}
+
+#
+# test functions
+#
+
+# test whether LC_ALL correctly overrides LC_MESSAGES in the choice of the system message
+# catalog
+# 1. This test assumes that the machine has ko_KR.UTF-8 + matching message catalogs installed
+# 2. We run this test in a |fork()|'ed subshell to isolate it from the other tests
+function test_lc_all_override1
+{
+ typeset out
+
+ (
+ ulimit -c 0 # force ksh93 to |fork()| for this subshell
+
+ unset ${!LC_*} LANG
+ #export LANG=en_US.UTF-8
+ export LC_ALL="en_US.UTF-8"
+
+ integer ch_val
+ integer korean_count=0
+ ${SHELL} -c 'LC_MESSAGES=C ${SHELL} -c "cd no_dir_llkk ; export LC_ALL="ko_KR.UTF-8" ; cd "no_dir_ooo" ; true"' >"out" 2>&1 || err_exit "Test shell failed with non-zero exit code $?"
+
+ while read -N1 c ; do
+ (( ch_val='${c} ))
+
+ (( ch_val >= 0xac00 && ch_val <= 0xdfff )) && (( korean_count++ ))
+ done <"out"
+
+ # Solaris 11/B110 returns 13 characters for this test
+ (( korean_count >= 10 )) || err_exit "Expected at least 10 korean characters, got ${korean_count}"
+
+ rm "out"
+
+ exit $((Errors))
+ )
+ (( Errors += $? ))
+ return 0
+}
+
+# test whether the shell internally selects the correct message catalogs
+# when the value of LC_* or LANG is restored to a "previous" value (e.g.
+# subshell, function) or gets "reset" (e.g. unset)
+function test_lc_l10n_scope1
+{
+ compound -r -a testgroups=(
+ (
+ name="subshell"
+ typeset -a tests=(
+ 'LC_ALL="C" ; cd "nosuchdir2" ; (LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true'
+ 'LC_MESSAGES="C" ; cd "nosuchdir2" ; (LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true'
+ 'LANG="C" ; cd "nosuchdir2" ; (LANG="ja_JP.UTF-8" ; cd "nosuchdir2") ; cd "nosuchdir2" ; true'
+ )
+ )
+ (
+ name="unset"
+ typeset -a tests=(
+ 'LC_ALL="C" ; cd "nosuchdir2" ; LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LC_ALL ; cd "nosuchdir2" ; true'
+ 'LC_MESSAGES="C" ; cd "nosuchdir2" ; LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LC_MESSAGES ; cd "nosuchdir2" ; true'
+ 'LANG="C" ; cd "nosuchdir2" ; LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; unset LANG ; cd "nosuchdir2" ; true'
+ )
+ )
+ (
+ name="empty LC_xxx"
+ typeset -a tests=(
+ 'LC_ALL="C" ; cd "nosuchdir2" ; LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; LC_ALL="" ; cd "nosuchdir2" ; true'
+ 'LC_MESSAGES="C" ; cd "nosuchdir2" ; LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; LC_MESSAGES="" ; cd "nosuchdir2" ; true'
+ 'LANG="C" ; cd "nosuchdir2" ; LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; LANG="" ; cd "nosuchdir2" ; true'
+ )
+ )
+ (
+ name="function"
+ typeset -a tests=(
+ 'LC_ALL="C" ; cd "nosuchdir2" ; function x { typeset LC_ALL="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true'
+ 'LC_MESSAGES="C" ; cd "nosuchdir2" ; function x { typeset LC_MESSAGES="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true'
+ 'LANG="C" ; cd "nosuchdir2" ; function x { typeset LANG="ja_JP.UTF-8" ; cd "nosuchdir2" ; } ; x ; cd "nosuchdir2" ; true'
+ )
+ )
+ )
+
+
+ typeset tgi ti out2
+
+ for tgi in "${!testgroups[@]}" ; do
+ nameref tg=testgroups[${tgi}]
+
+ for ti in "${!tg.tests[@]}" ; do
+ nameref ts=tg.tests[${ti}]
+
+ ${SHELL} -c "unset LANG \${!LC_*} ; ${SHELL} -c \"${ts}\"" >out 2>&1 || err_exit "test returned non-zero exit code $?"
+ out2="${
+ while read -r line ; do
+ string_has_multibyte_characters "${line}" && print -n "A" || print -n "_"
+ done <"out"
+ print ""
+ }"
+ if [[ "${out2}" != '_A_' ]] ; then
+ err_exit "test '${tg.name}'/'$ts' failed: Expected '_A_', got '${out2}'"
+ #cat out
+ fi
+ done
+ done
+
+ rm "out"
+
+ return 0
+}
+
+
+# run tests
+test_lc_all_override1
+test_lc_l10n_scope1
+
+
+cd "${ocwd}"
+rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".
+
+# tests done
+exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh b/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh
index 9f430d7c1c..64574c2733 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh
@@ -20,15 +20,14 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
function err_exit2
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors+=1 ))
+ (( Errors < 127 && Errors++ ))
}
function testfunc
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh b/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh
index bf5257a78a..9e11cc23d2 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -55,7 +54,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh b/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh
index c2ca8f5e5e..ea7d7bd274 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -36,7 +35,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh b/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh
index 1bab7006c3..834234a44c 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh
+++ b/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -36,7 +35,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors++ ))
+ (( Errors < 127 && Errors++ ))
}
alias err_exit='err_exit $LINENO'
diff --git a/usr/src/lib/libshell/common/tests/tilde.sh b/usr/src/lib/libshell/common/tests/tilde.sh
index e22626f6df..ef5dc5c364 100644
--- a/usr/src/lib/libshell/common/tests/tilde.sh
+++ b/usr/src/lib/libshell/common/tests/tilde.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/timetype.sh b/usr/src/lib/libshell/common/tests/timetype.sh
index 94b27843f1..8a2d17d324 100644
--- a/usr/src/lib/libshell/common/tests/timetype.sh
+++ b/usr/src/lib/libshell/common/tests/timetype.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/types.sh b/usr/src/lib/libshell/common/tests/types.sh
index 5904640e07..c20f2eb125 100644
--- a/usr/src/lib/libshell/common/tests/types.sh
+++ b/usr/src/lib/libshell/common/tests/types.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/variables.sh b/usr/src/lib/libshell/common/tests/variables.sh
index f174a9a2bf..da943e0c87 100644
--- a/usr/src/lib/libshell/common/tests/variables.sh
+++ b/usr/src/lib/libshell/common/tests/variables.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
@@ -647,4 +647,13 @@ do exp="$cmd ok"
[[ $got == "$exp" ]] || err_exit "cd with CDPATH after PATH change failed -- expected '$exp', got '$got'"
done
+v=LC_CTYPE
+unset $v
+[[ -v $v ]] && err_exit "unset $v; [[ -v $v ]] failed"
+eval $v=C
+[[ -v $v ]] || err_exit "$v=C; [[ -v $v ]] failed"
+
+cmd='set --nounset; unset foo; : ${!foo*}'
+$SHELL -c "$cmd" 2>/dev/null || err_exit "'$cmd' exit status $?, expected 0"
+
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/vartree1.sh b/usr/src/lib/libshell/common/tests/vartree1.sh
index 67134086af..4701251549 100644
--- a/usr/src/lib/libshell/common/tests/vartree1.sh
+++ b/usr/src/lib/libshell/common/tests/vartree1.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/common/tests/vartree2.sh b/usr/src/lib/libshell/common/tests/vartree2.sh
index 9f478ae140..806b443377 100644
--- a/usr/src/lib/libshell/common/tests/vartree2.sh
+++ b/usr/src/lib/libshell/common/tests/vartree2.sh
@@ -1,7 +1,7 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2009 AT&T Intellectual Property #
+# Copyright (c) 1982-2010 AT&T Intellectual Property #
# and is licensed under the #
# Common Public License, Version 1.0 #
# by AT&T Intellectual Property #
diff --git a/usr/src/lib/libshell/i386/include/ast/history.h b/usr/src/lib/libshell/i386/include/ast/history.h
index 0159773f4d..1b0f3ce403 100644
--- a/usr/src/lib/libshell/i386/include/ast/history.h
+++ b/usr/src/lib/libshell/i386/include/ast/history.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/i386/include/ast/nval.h b/usr/src/lib/libshell/i386/include/ast/nval.h
index a81d34b84a..f5be4fa865 100644
--- a/usr/src/lib/libshell/i386/include/ast/nval.h
+++ b/usr/src/lib/libshell/i386/include/ast/nval.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/i386/include/ast/shell.h b/usr/src/lib/libshell/i386/include/ast/shell.h
index b5d87afc94..a8c1d85c3b 100644
--- a/usr/src/lib/libshell/i386/include/ast/shell.h
+++ b/usr/src/lib/libshell/i386/include/ast/shell.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct
index 244572d4c5..1eacd5748b 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_acct_ksh93
#define _def_acct_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_acct 1 /* acct() in default lib(s) */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds
index 49759dec7a..624e61d6aa 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/cmds by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/cmds by iffe version 2009-12-04 : : */
#ifndef _def_cmds_ksh93
#define _def_cmds_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _cmd_newgrp 1 /* newgrp in ?(/usr)/(bin|etc|ucb) */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic
index 1b4e91ae24..1eec287fc4 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/dynamic by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/dynamic by iffe version 2009-12-04 : : */
#ifndef _def_dynamic_ksh93
#define _def_dynamic_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#if SHOPT_DYNAMIC
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs
index e7f2528287..932467ae55 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_execargs_ksh93
#define _def_execargs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs
index 22eb25b028..87d724ff31 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/externs by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
@@ -63,10 +63,10 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_exec_attr 1 /* #include <exec_attr.h> ok */
@@ -75,10 +75,12 @@
#define _lib_setreuid 1 /* setreuid() in default lib(s) */
#define _lib_setregid 1 /* setregid() in default lib(s) */
#define _lib_nice 1 /* nice() in default lib(s) */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
#define _lib_fork 1 /* fork() in default lib(s) */
#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */
#define _lib_fchdir 1 /* fchdir() in default lib(s) */
#define _sys_mman 1 /* #include <sys/mman.h> ok */
#define _lib_memcntl 1 /* memcntl() in default lib(s) */
+#define _LIB_secdb 1 /* -lsecdb is a library */
+#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */
+#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */
#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale
index 77018234ee..58f37b7293 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/locale by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
#ifndef _def_locale_ksh93
#define _def_locale_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_locale 1 /* #include <locale.h> ok */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math
index 5b8088f5fa..fbe05f198a 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,15 +62,15 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
-/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/data/math.tab : : */
+/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options
index 6dcb17ce26..0ca0c8c236 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/options by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/options by iffe version 2009-12-04 : : */
#ifndef _def_options_ksh93
#define _def_options_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define SHELLMAGIC 1
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll
index d4e3c2db6f..b964d0401a 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/poll by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,10 +62,10 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat
index b6be9afb88..abb87a7d96 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_pstat_ksh93
#define _def_pstat_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits
index a61321f297..89aa709889 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/rlimits by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/rlimits by iffe version 2009-12-04 : : */
#ifndef _def_rlimits_ksh93
#define _def_rlimits_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _sys_resource 1 /* #include <sys/resource.h> ok */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp
index 2323618ae6..52ddecf760 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
#ifndef _def_setjmp_ksh93
#define _def_setjmp_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigsetjmp 1 /* sigsetjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures
index b40e774dbc..25b4198fd1 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
#ifndef _def_sigfeatures_ksh93
#define _def_sigfeatures_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time
index 524df0ed96..2c56a3523c 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/time by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
#ifndef _def_time_ksh93
#define _def_time_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_utime 1 /* #include <utime.h> ok */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys
index c7a345a56c..6c6422a04d 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys
+++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/src/cmd/ksh93/features/ttys by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/ttys by iffe version 2009-12-04 : : */
#ifndef _def_ttys_ksh93
#define _def_ttys_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/arch/sol11.i386/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_termios 1 /* #include <termios.h> ok */
diff --git a/usr/src/lib/libshell/misc/ERRATA.txt b/usr/src/lib/libshell/misc/ERRATA.txt
index dc860d14fb..184b6aa01e 100644
--- a/usr/src/lib/libshell/misc/ERRATA.txt
+++ b/usr/src/lib/libshell/misc/ERRATA.txt
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -372,33 +371,6 @@ of the next line if the terminal cursor is not at position 0.
######## Errata #004: ########
-A workaround has been added for a probem with the AST "tail" builtin which
-causes "tail" to sleep too long when polling for data in "follow" mode.
-The following files have been changed:
--- snip --
-Index: src/lib/libcmd/common/tail.c
-===================================================================
---- usr/src/lib/libcmd/common/tail.c (revision 1701)
-+++ usr/src/lib/libcmd/common/tail.c (working copy)
-@@ -636,7 +636,14 @@
- {
- if (sfsync(sfstdout))
- error(ERROR_system(1), "write error");
-+#if 0
- sleep(1);
-+#else
-+ {
-+ struct timespec rqt = { 0L, 1000000000L/4L };
-+ (void)nanosleep(&rqt, NULL);
-+ }
-+#endif
- n = 0;
- pp = 0;
- while (fp)
--- snip --
-
-
-######## Errata #005: ########
The POSIX "cksum"/CRC and AT&T "sum" codepaths in libsum have been reworked
and then backpoprted to address a performance regression on some
machine/architecture combinations.
@@ -782,4 +754,264 @@ Index: usr/src/lib/libsum/common/sum-att.c
att_done(Sum_t* p)
-- snip --
+
+
+######## Errata #005: ########
+A fix for an off-by-one buffer overflow in the regex expression cache
+has been backported.
+The following files have been changed:
+-- snip --
+Index: usr/src/lib/libast/common/regex/regcache.c
+===================================================================
+--- usr/src/lib/libast/common/regex/regcache.c (revision 1821)
++++ usr/src/lib/libast/common/regex/regcache.c (working copy)
+@@ -166,7 +166,7 @@
+ cp->keep = 0;
+ regfree(&cp->re);
+ }
+- if ((i = strlen(pattern)) >= cp->size)
++ if ((i = strlen(pattern) + 1) >= cp->size)
+ {
+ cp->size = roundof(i, ROUND);
+ if (!(cp->pattern = newof(cp->pattern, char, cp->size, 0)))
+-- snip --
+
+
+######## Errata #006: ########
+A fix for an issue with tail -f becoming stuck after a few 1000 lines
+has been backported:
+The following files have been changed:
+-- snip --
+Index: usr/src/lib/libcmd/common/tail.c
+===================================================================
+--- usr/src/lib/libcmd/common/tail.c (revision 1822)
++++ usr/src/lib/libcmd/common/tail.c (working copy)
+@@ -28,7 +28,7 @@
+ */
+
+ static const char usage[] =
+-"+[-?\n@(#)$Id: tail (AT&T Research) 2010-03-07 $\n]"
++"+[-?\n@(#)$Id: tail (AT&T Research) 2010-03-23 $\n]"
+ USAGE_LICENSE
+ "[+NAME?tail - output trailing portion of one or more files ]"
+ "[+DESCRIPTION?\btail\b copies one or more input files to standard output "
+@@ -647,16 +647,14 @@
+ error(ERROR_system(0), "%s: cannot stat", fp->name);
+ else if (fp->fifo || fp->end < st.st_size)
+ {
+- fp->end = st.st_size;
+ n = 1;
+ if (timeout)
+ fp->expire = NOW + timeout;
+- z = fp->fifo ? SF_UNBOUND : fp->end - fp->cur;
++ z = fp->fifo ? SF_UNBOUND : st.st_size - fp->cur;
+ i = 0;
+ if ((s = sfreserve(fp->sp, z, SF_LOCKR)) || (z = sfvalue(fp->sp)) && (s = sfreserve(fp->sp, z, SF_LOCKR)) && (i = 1))
+ {
+- if (fp->fifo)
+- z = sfvalue(fp->sp);
++ z = sfvalue(fp->sp);
+ for (r = s + z; r > s && *(r - 1) != '\n'; r--);
+ if ((w = r - s) || i && (w = z))
+ {
+@@ -672,6 +670,7 @@
+ else
+ w = 0;
+ sfread(fp->sp, s, w);
++ fp->end += w;
+ }
+ goto next;
+ }
+-- snip --
+
+
+
+
+######## Errata #007: ########
+A warning for shcomp -n has been backported from ksh93 version 'u' to
+handle the possible loss of precision in (( var=$var2 )) vs.
+(( var=var2 )):
+The following files have been changed:
+-- snip --
+Index: usr/src/lib/libshell/common/sh/parse.c
+===================================================================
+--- usr/src/lib/libshell/common/sh/parse.c (revision 1822)
++++ usr/src/lib/libshell/common/sh/parse.c (working copy)
+@@ -247,6 +247,34 @@
+ return(par);
+ }
+
++static int paramsub(const char *str)
++{
++ register int c,sub=0,lit=0;
++ while(c= *str++)
++ {
++ if(c=='$' && !lit)
++ {
++ if(*str=='(')
++ return(0);
++ if(sub)
++ continue;
++ if(*str=='{')
++ str++;
++ if(!isdigit(*str) && strchr("?#@*!$ ",*str)==0)
++ return(1);
++ }
++ else if(c=='`')
++ return(0);
++ else if(c=='[' && !lit)
++ sub++;
++ else if(c==']' && !lit)
++ sub--;
++ else if(c=='\'')
++ lit = !lit;
++ }
++ return(0);
++}
++
+ static Shnode_t *getanode(Lex_t *lp, struct argnod *ap)
+ {
+ register Shnode_t *t = getnode(arithnod);
+@@ -256,7 +284,11 @@
+ if(ap->argflag&ARG_RAW)
+ t->ar.arcomp = sh_arithcomp(ap->argval);
+ else
++ {
++ if(sh_isoption(SH_NOEXEC) && (ap->argflag&ARG_MAC) && paramsub(ap->argval))
++ errormsg(SH_DICT,ERROR_warn(0),"%d: parameter substitution requires unnecessary string to number conversion",lp->sh->inlineno-(lp->token=='\n'));
+ t->ar.arcomp = 0;
++ }
+ return(t);
+ }
+
+-- snip --
+
+
+######## Errata #008: ########
+A fix for an issue with a Sun Studio warning has been backported:
+The following files have been changed:
+-- snip --
+Index: usr/src/lib/libast/common/path/pathtemp.c
+===================================================================
+--- usr/src/lib/libast/common/path/pathtemp.c (revision 1822)
++++ usr/src/lib/libast/common/path/pathtemp.c (working copy)
+@@ -297,7 +297,7 @@
+ */
+
+ tmp.pid = getpid();
+- tmp.rng = (uint32_t)tmp.pid * ((uint32_t)time(NiL) ^ (((uint32_t)(&attempt)) >> 3) ^ (((uint32_t)tmp.dir) >> 3));
++ tmp.rng = (uintptr_t)tmp.pid * ((uintptr_t)time(NiL) ^ (((uintptr_t)(&attempt)) >> 3) ^ (((uintptr_t)tmp.dir) >> 3));
+ if (!tmp.key)
+ tmp.key = (tmp.rng >> 16) | ((tmp.rng & 0xffff) << 16);
+ tmp.rng ^= tmp.key;
+-- snip --
+
+
+######## Errata #009: ########
+A fix for an issue with a typeset -p having problems with compound
+variables and typeset -a -C loosing the -C attribute has been
+backported from ksh93 version "u-":
+-- snip --
+Index: usr/src/lib/libshell/common/bltins/typeset.c
+===================================================================
+--- usr/src/lib/libshell/common/bltins/typeset.c (revision 1863)
++++ usr/src/lib/libshell/common/bltins/typeset.c (working copy)
+@@ -540,7 +540,12 @@
+ else if(nv_isnull(np))
+ nv_onattr(np,NV_ARRAY|(comvar?NV_NOFREE:0));
+ else
++ {
++ Namarr_t *ap=nv_arrayptr(np);
++ if(ap && comvar)
++ ap->nelem |= ARRAY_TREE;
+ nv_putsub(np, (char*)0, 0);
++ }
+ }
+ else if(nvflags&NV_ARRAY)
+ {
+Index: usr/src/lib/libshell/common/sh/nvtree.c
+===================================================================
+--- usr/src/lib/libshell/common/sh/nvtree.c (revision 1863)
++++ usr/src/lib/libshell/common/sh/nvtree.c (working copy)
+@@ -69,6 +69,7 @@
+ static Namval_t *create_tree(Namval_t *np,const char *name,int flag,Namfun_t *dp)
+ {
+ register Namfun_t *fp=dp;
++ fp->dsize = 0;
+ while(fp=fp->next)
+ {
+ if(fp->disc && fp->disc->createf)
+@@ -723,7 +724,10 @@
+ nv_attribute(np,wp->out,"typeset",'=');
+ nv_outname(wp->out,name,-1);
+ if((np->nvalue.cp && np->nvalue.cp!=Empty) || nv_isattr(np,~(NV_MINIMAL|NV_NOFREE)) || nv_isvtree(np))
+- sfputc(wp->out,(isarray==2?'\n':'='));
++ {
++ if(wp->indent>=0 || isarray!=2)
++ sfputc(wp->out,(isarray==2?'\n':'='));
++ }
+ if(isarray==2)
+ return;
+ }
+@@ -1015,7 +1019,7 @@
+ */
+ char *nv_getvtree(register Namval_t *np, Namfun_t *fp)
+ {
+- int flags=0;
++ int flags=0, dsize=fp->dsize;
+ for(; fp && fp->next; fp=fp->next)
+ {
+ if(fp->next->disc && (fp->next->disc->getnum || fp->next->disc->getval))
+@@ -1027,6 +1031,8 @@
+ return(nv_getv(np,fp));
+ if(flags = nv_isattr(np,NV_EXPORT))
+ nv_offattr(np,NV_EXPORT);
++ if(dsize && (flags&NV_EXPORT))
++ return("()");
+ return(walk_tree(np,(Namval_t*)0,flags));
+ }
+
+@@ -1083,6 +1089,7 @@
+ return;
+ nfp = newof(NIL(void*),Namfun_t,1,0);
+ nfp->disc = &treedisc;
++ nfp->dsize = sizeof(Namfun_t);
+ nv_stack(np, nfp);
+ }
+
+Index: usr/src/lib/libshell/common/sh/array.c
+===================================================================
+--- usr/src/lib/libshell/common/sh/array.c (revision 1863)
++++ usr/src/lib/libshell/common/sh/array.c (working copy)
+@@ -923,9 +923,10 @@
+ if(array_isbit(aq->bits, dot,ARRAY_CHILD))
+ {
+ Namval_t *mp = aq->val[dot].np;
+- if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp))
++ if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp) && !mp->nvfun->dsize)
+ continue;
+- nv_putsub(mp,NIL(char*),ARRAY_UNDEF);
++ if(nv_isarray(mp))
++ nv_putsub(mp,NIL(char*),ARRAY_UNDEF);
+ }
+ return(1);
+ }
+Index: usr/src/lib/libshell/common/sh/name.c
+===================================================================
+--- usr/src/lib/libshell/common/sh/name.c (revision 1863)
++++ usr/src/lib/libshell/common/sh/name.c (working copy)
+@@ -538,7 +538,11 @@
+
+ }
+ if(!nv_isarray(np) && !typ && (tp->com.comarg || !tp->com.comset || tp->com.comset->argval[0]!='['))
++ {
+ nv_setvtree(np);
++ if(tp->com.comarg || tp->com.comset)
++ np->nvfun->dsize = 0;
++ }
+ #if SHOPT_TYPEDEF
+ goto check_type;
+ #else
+-- snip --
+
# EOF.
diff --git a/usr/src/lib/libshell/misc/buildksh93.readme b/usr/src/lib/libshell/misc/buildksh93.readme
index 6edf060f5c..ceff00f77c 100644
--- a/usr/src/lib/libshell/misc/buildksh93.readme
+++ b/usr/src/lib/libshell/misc/buildksh93.readme
@@ -19,8 +19,7 @@
# CDDL HEADER END
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -49,14 +48,14 @@ properly found.
* Example usage of the script (more information can be found in the
script itself):
## Download AT&T ksh93 sources
-$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/INIT.2009-10-14.tgz'
-$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/ast-ksh.2009-10-14.tgz'
+$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/INIT.2010-03-09.tgz'
+$ wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/ast-ksh.2010-03-09.tgz'
## Unpack the sources (32bit SPARC):
$ mkdir build_sparc_32bit
$ cd build_sparc_32bit
-$ gunzip -c <../INIT.2009-10-14.tgz | tar -xf -
-$ gunzip -c <../ast-ksh.2009-10-14.tgz | tar -xf -
+$ gunzip -c <../INIT.2010-03-09.tgz | tar -xf -
+$ gunzip -c <../ast-ksh.2010-03-09.tgz | tar -xf -
## Build ast-ksh for 32bit SPARC
# (build other build flags are:
diff --git a/usr/src/lib/libshell/misc/buildksh93.sh b/usr/src/lib/libshell/misc/buildksh93.sh
index c590047edb..d89941d278 100644
--- a/usr/src/lib/libshell/misc/buildksh93.sh
+++ b/usr/src/lib/libshell/misc/buildksh93.sh
@@ -23,8 +23,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -33,8 +32,8 @@
#
# ksh93t sources can be downloaded like this from the AT&T site:
-# wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/INIT.2009-10-14.tgz'
-# wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/sw/download/beta/ast-ksh.2009-10-14.tgz'
+# wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/INIT.2010-03-09.tgz'
+# wget --http-user="I accept www.opensource.org/licenses/cpl" --http-passwd="." 'http://www.research.att.com/~gsf/download/tgz/ast-ksh.2010-03-09.tgz'
function fatal_error
{
@@ -93,8 +92,7 @@ cat <<ENDOFTEXT
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SOLARIS_KSH_CMDLIST_H
@@ -111,16 +109,6 @@ extern "C" {
* tools
*/
-/* POSIX compatible commands */
-#ifdef _NOT_YET
-#define XPG6CMDLIST(f) \\
- { "/usr/xpg6/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#define XPG4CMDLIST(f) \\
- { "/usr/xpg4/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#else
-#define XPG6CMDLIST(f)
-#define XPG4CMDLIST(f)
-#endif /* NOT_YET */
/*
* Commands which are 100% compatible with native Solaris versions (/bin is
* a softlink to ./usr/bin, ksh93 takes care about the lookup)
@@ -133,6 +121,18 @@ extern "C" {
{ "/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
#define SUSRBINCMDLIST(f) \\
{ "/usr/sbin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+/* POSIX compatible commands */
+#define XPG6CMDLIST(f) \\
+ { "/usr/xpg6/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#define XPG4CMDLIST(f) \\
+ { "/usr/xpg4/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#ifdef SHOPT_USR_GNU_BIN_BUILTINS
+/* GNU coreutils compatible commands */
+#define GNUCMDLIST(f) \\
+ { "/usr/gnu/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
+#else
+#define GNUCMDLIST(f)
+#endif
/*
* Make all ksh93 builtins accessible when /usr/ast/bin was added to
* /usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
@@ -146,83 +146,115 @@ extern "C" {
#undef mktemp
/* Generated data, do not edit. */
-XPG4CMDLIST(basename)
ASTCMDLIST(basename)
-BINCMDLIST(cat)
+GNUCMDLIST(basename)
+XPG4CMDLIST(basename)
ASTCMDLIST(cat)
-XPG4CMDLIST(chgrp)
+BINCMDLIST(cat)
ASTCMDLIST(chgrp)
+// XPG4CMDLIST(chgrp)
ASTCMDLIST(chmod)
-XPG4CMDLIST(chown)
-BINCMDLIST(chown)
ASTCMDLIST(chown)
-BINCMDLIST(cksum)
+// XPG4CMDLIST(chown)
+BINCMDLIST(chown)
ASTCMDLIST(cksum)
-BINCMDLIST(cmp)
+BINCMDLIST(cksum)
+GNUCMDLIST(cksum)
ASTCMDLIST(cmp)
-BINCMDLIST(comm)
+BINCMDLIST(cmp)
ASTCMDLIST(comm)
-XPG4CMDLIST(cp)
+BINCMDLIST(comm)
+GNUCMDLIST(comm)
ASTCMDLIST(cp)
-BINCMDLIST(cut)
+// XPG4CMDLIST(cp)
ASTCMDLIST(cut)
-XPG4CMDLIST(date)
+BINCMDLIST(cut)
+GNUCMDLIST(cut)
ASTCMDLIST(date)
+// XPG4CMDLIST(date)
ASTCMDLIST(dirname)
-XPG4CMDLIST(expr)
+BINCMDLIST(dirname)
+GNUCMDLIST(dirname)
+// ASTCMDLIST(egrep)
+// XPG4CMDLIST(egrep)
ASTCMDLIST(expr)
+GNUCMDLIST(expr)
+XPG6CMDLIST(expr)
ASTCMDLIST(fds)
+// ASTCMDLIST(fgrep)
+// XPG4CMDLIST(fgrep)
ASTCMDLIST(fmt)
-BINCMDLIST(fold)
ASTCMDLIST(fold)
-BINCMDLIST(head)
+BINCMDLIST(fold)
+GNUCMDLIST(fold)
+// ASTCMDLIST(grep)
+// XPG4CMDLIST(grep)
ASTCMDLIST(head)
-XPG4CMDLIST(id)
+BINCMDLIST(head)
ASTCMDLIST(id)
-BINCMDLIST(join)
+XPG4CMDLIST(id)
ASTCMDLIST(join)
-XPG4CMDLIST(ln)
+BINCMDLIST(join)
+GNUCMDLIST(join)
ASTCMDLIST(ln)
-BINCMDLIST(logname)
+// XPG4CMDLIST(ln)
ASTCMDLIST(logname)
-BINCMDLIST(mkdir)
+BINCMDLIST(logname)
+GNUCMDLIST(logname)
+ASTCMDLIST(md5sum)
ASTCMDLIST(mkdir)
-BINCMDLIST(mkfifo)
+BINCMDLIST(mkdir)
+GNUCMDLIST(mkdir)
ASTCMDLIST(mkfifo)
-BINCMDLIST(mktemp)
+BINCMDLIST(mkfifo)
+GNUCMDLIST(mkfifo)
ASTCMDLIST(mktemp)
-XPG4CMDLIST(mv)
+BINCMDLIST(mktemp)
+GNUCMDLIST(mktemp)
ASTCMDLIST(mv)
-BINCMDLIST(paste)
+// XPG4CMDLIST(mv)
ASTCMDLIST(paste)
-BINCMDLIST(pathchk)
+BINCMDLIST(paste)
+GNUCMDLIST(paste)
ASTCMDLIST(pathchk)
-BINCMDLIST(rev)
+BINCMDLIST(pathchk)
+GNUCMDLIST(pathchk)
+// ASTCMDLIST(readlink)
ASTCMDLIST(rev)
-XPG4CMDLIST(rm)
+BINCMDLIST(rev)
ASTCMDLIST(rm)
-BINCMDLIST(rmdir)
+XPG4CMDLIST(rm)
ASTCMDLIST(rmdir)
-XPG4CMDLIST(stty)
+BINCMDLIST(rmdir)
+GNUCMDLIST(rmdir)
+GNUCMDLIST(sleep)
ASTCMDLIST(stty)
-BINCMDLIST(sum)
+// XPG4CMDLIST(stty)
ASTCMDLIST(sum)
-SUSRBINCMDLIST(sync)
-SBINCMDLIST(sync)
-BINCMDLIST(sync)
+BINCMDLIST(sum)
ASTCMDLIST(sync)
+BINCMDLIST(sync)
+GNUCMDLIST(sync)
+SBINCMDLIST(sync)
+SUSRBINCMDLIST(sync)
+ASTCMDLIST(tail)
BINCMDLIST(tail)
XPG4CMDLIST(tail)
-ASTCMDLIST(tail)
-BINCMDLIST(tee)
ASTCMDLIST(tee)
-BINCMDLIST(tty)
+BINCMDLIST(tee)
+GNUCMDLIST(tee)
ASTCMDLIST(tty)
+BINCMDLIST(tty)
+GNUCMDLIST(tty)
ASTCMDLIST(uname)
-BINCMDLIST(uniq)
ASTCMDLIST(uniq)
-BINCMDLIST(wc)
+BINCMDLIST(uniq)
+GNUCMDLIST(uniq)
ASTCMDLIST(wc)
+BINCMDLIST(wc)
+GNUCMDLIST(wc)
+// ASTCMDLIST(xgrep)
+// BINCMDLIST(xgrep)
/* Mandatory for ksh93 test suite and AST scripts */
BINCMDLIST(getconf)
@@ -230,8 +262,8 @@ BINCMDLIST(getconf)
#ifdef __cplusplus
}
#endif
-
#endif /* !_SOLARIS_KSH_CMDLIST_H */
+
ENDOFTEXT
}
@@ -418,7 +450,7 @@ function build_shell
"${root}/lib/libshell.a" "${root}/lib/libshell-g.a" \
"${root}/lib/libsum.a" "${root}/lib/libsum-g.a" \
"${root}/lib/libdll.a" "${root}/lib/libdll-g.a" \
- "${root}/lib/libast.a""${root}/lib/libast-g.a"
+ "${root}/lib/libast.a" "${root}/lib/libast-g.a"
if [[ "${buildmode}" == *solaris* ]] ; then
${CC} ${CCFLAGS} ${bsuncc_app_ccflags} -L${root}/lib/ -Bdirect -o ksh pmain.o -lshell -Bstatic -l${link_libcmd} -Bdynamic -lsum -ldll -last -lm -lmd -lsecdb
@@ -475,7 +507,7 @@ function test_shell
[[ ! -f "${SHELL}" ]] && fatal_error "test_shell: |${SHELL}| is not a file."
[[ ! -x "${SHELL}" ]] && fatal_error "test_shell: |${SHELL}| is not executable."
- [[ "${TEST_LANG}" == "" ]] && TEST_LANG="C ja_JP.UTF-8"
+ [[ "${TEST_LANG}" == "" ]] && TEST_LANG="C zh_CN.GB18030 en_US.UTF-8"
case "${buildmode}" in
testshell.bcheck*)
@@ -490,7 +522,7 @@ function test_shell
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32"\
LC_ALL="${lang}" LANG="${lang}" \
- VMDEBUG=a \
+ VMALLOC_OPTIONS=abort \
"$i"
cat "${bc_logfile}"
done
@@ -510,7 +542,7 @@ function test_shell
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32" \
LC_ALL="${lang}" LANG="${lang}" \
- VMDEBUG=a \
+ VMALLOC_OPTIONS=abort \
SHCOMP=$PWD/arch/*/bin/shcomp \
"$i"
done
diff --git a/usr/src/lib/libshell/sparc/include/ast/history.h b/usr/src/lib/libshell/sparc/include/ast/history.h
index 0159773f4d..1b0f3ce403 100644
--- a/usr/src/lib/libshell/sparc/include/ast/history.h
+++ b/usr/src/lib/libshell/sparc/include/ast/history.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparc/include/ast/nval.h b/usr/src/lib/libshell/sparc/include/ast/nval.h
index a81d34b84a..f5be4fa865 100644
--- a/usr/src/lib/libshell/sparc/include/ast/nval.h
+++ b/usr/src/lib/libshell/sparc/include/ast/nval.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparc/include/ast/shell.h b/usr/src/lib/libshell/sparc/include/ast/shell.h
index b5d87afc94..a8c1d85c3b 100644
--- a/usr/src/lib/libshell/sparc/include/ast/shell.h
+++ b/usr/src/lib/libshell/sparc/include/ast/shell.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct
index 65af6a1891..0521a3c2c0 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_acct_ksh93
#define _def_acct_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_acct 1 /* acct() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds
index ffa3d489d6..a68e07ab37 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/cmds by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/cmds by iffe version 2009-12-04 : : */
#ifndef _def_cmds_ksh93
#define _def_cmds_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _cmd_newgrp 1 /* newgrp in ?(/usr)/(bin|etc|ucb) */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic
index 9526abebf8..a74c7841a8 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/dynamic by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/dynamic by iffe version 2009-12-04 : : */
#ifndef _def_dynamic_ksh93
#define _def_dynamic_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#if SHOPT_DYNAMIC
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs
index 65fceba92f..5a14cde36f 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_execargs_ksh93
#define _def_execargs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs
index e6624877ca..227e9c3448 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/externs by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
@@ -63,10 +63,10 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_exec_attr 1 /* #include <exec_attr.h> ok */
@@ -75,10 +75,12 @@
#define _lib_setreuid 1 /* setreuid() in default lib(s) */
#define _lib_setregid 1 /* setregid() in default lib(s) */
#define _lib_nice 1 /* nice() in default lib(s) */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
#define _lib_fork 1 /* fork() in default lib(s) */
#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */
#define _lib_fchdir 1 /* fchdir() in default lib(s) */
#define _sys_mman 1 /* #include <sys/mman.h> ok */
#define _lib_memcntl 1 /* memcntl() in default lib(s) */
+#define _LIB_secdb 1 /* -lsecdb is a library */
+#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */
+#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */
#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale
index 4923ce9038..d72fc310ef 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/locale by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
#ifndef _def_locale_ksh93
#define _def_locale_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_locale 1 /* #include <locale.h> ok */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math
index 535a82b7ed..5472de8ac6 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,15 +62,15 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
-/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/data/math.tab : : */
+/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options
index c2003e67fe..8bace0bf6b 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/options by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/options by iffe version 2009-12-04 : : */
#ifndef _def_options_ksh93
#define _def_options_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define SHELLMAGIC 1
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll
index 6236914ca7..3cbe11692f 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/poll by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,10 +62,10 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat
index 404f4fe7e8..b80003c053 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_pstat_ksh93
#define _def_pstat_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits
index 831b927c6a..c3421ba013 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/rlimits by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/rlimits by iffe version 2009-12-04 : : */
#ifndef _def_rlimits_ksh93
#define _def_rlimits_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _sys_resource 1 /* #include <sys/resource.h> ok */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp
index dfd9d97f4b..0ab47cb0f0 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
#ifndef _def_setjmp_ksh93
#define _def_setjmp_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigsetjmp 1 /* sigsetjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures
index 92f6c62e10..0951a434a1 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
#ifndef _def_sigfeatures_ksh93
#define _def_sigfeatures_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time
index d4710ad9c9..95b62e121b 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/time by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
#ifndef _def_time_ksh93
#define _def_time_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_utime 1 /* #include <utime.h> ok */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys
index 8be01d4df6..6d2b6b2203 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys
+++ b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/src/cmd/ksh93/features/ttys by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/ttys by iffe version 2009-12-04 : : */
#ifndef _def_ttys_ksh93
#define _def_ttys_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_termios 1 /* #include <termios.h> ok */
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/history.h b/usr/src/lib/libshell/sparcv9/include/ast/history.h
index 0159773f4d..1b0f3ce403 100644
--- a/usr/src/lib/libshell/sparcv9/include/ast/history.h
+++ b/usr/src/lib/libshell/sparcv9/include/ast/history.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/nval.h b/usr/src/lib/libshell/sparcv9/include/ast/nval.h
index a81d34b84a..f5be4fa865 100644
--- a/usr/src/lib/libshell/sparcv9/include/ast/nval.h
+++ b/usr/src/lib/libshell/sparcv9/include/ast/nval.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/shell.h b/usr/src/lib/libshell/sparcv9/include/ast/shell.h
index b5d87afc94..a8c1d85c3b 100644
--- a/usr/src/lib/libshell/sparcv9/include/ast/shell.h
+++ b/usr/src/lib/libshell/sparcv9/include/ast/shell.h
@@ -3,7 +3,7 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2009 AT&T Intellectual Property *
+* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct
index ce3ad037f2..41a73df04b 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_acct_ksh93
#define _def_acct_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_acct 1 /* acct() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds
index 2647861d28..1b049f5eb2 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/cmds by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/cmds by iffe version 2009-12-04 : : */
#ifndef _def_cmds_ksh93
#define _def_cmds_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _cmd_newgrp 1 /* newgrp in ?(/usr)/(bin|etc|ucb) */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic
index 91d80eb432..e58ac233c1 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/dynamic by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/dynamic by iffe version 2009-12-04 : : */
#ifndef _def_dynamic_ksh93
#define _def_dynamic_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#if SHOPT_DYNAMIC
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs
index a39c9dd160..bbb4e0ab1e 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_execargs_ksh93
#define _def_execargs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs
index 488cbd07d5..18685dcd89 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/externs by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
@@ -63,10 +63,10 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_exec_attr 1 /* #include <exec_attr.h> ok */
@@ -75,10 +75,12 @@
#define _lib_setreuid 1 /* setreuid() in default lib(s) */
#define _lib_setregid 1 /* setregid() in default lib(s) */
#define _lib_nice 1 /* nice() in default lib(s) */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
#define _lib_fork 1 /* fork() in default lib(s) */
#define _lib_spawnveg 1 /* spawnveg() in default lib(s) */
#define _lib_fchdir 1 /* fchdir() in default lib(s) */
#define _sys_mman 1 /* #include <sys/mman.h> ok */
#define _lib_memcntl 1 /* memcntl() in default lib(s) */
+#define _LIB_secdb 1 /* -lsecdb is a library */
+#define _lib_getexecuser 1 /* getexecuser() in default lib(s) */
+#define _lib_free_execattr 1 /* free_execattr() in default lib(s) */
#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale
index e1f9d582b7..c316c2772f 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/locale by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
#ifndef _def_locale_ksh93
#define _def_locale_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_locale 1 /* #include <locale.h> ok */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math
index 63e5c2c6cd..79b497ce1f 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/math.sh by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,15 +62,15 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
-/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/data/math.tab : : */
+/* : : generated by iffe from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options
index 42ecfb7698..f794aeade3 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/options by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/options by iffe version 2009-12-04 : : */
#ifndef _def_options_ksh93
#define _def_options_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define SHELLMAGIC 1
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll
index da2b1e278c..86bb35630a 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/poll by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,10 +62,10 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat
index fef0d8f8e0..d5872dfca9 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat
@@ -1,11 +1,11 @@
-/* : : generated by iffe version 2009-10-06 : : */
+/* : : generated by iffe version 2009-12-04 : : */
#ifndef _def_pstat_ksh93
#define _def_pstat_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits
index 1eeed91657..3fd7e9715a 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/rlimits by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/rlimits by iffe version 2009-12-04 : : */
#ifndef _def_rlimits_ksh93
#define _def_rlimits_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _sys_resource 1 /* #include <sys/resource.h> ok */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp
index 155c6dd853..b1b967ccb9 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
#ifndef _def_setjmp_ksh93
#define _def_setjmp_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigsetjmp 1 /* sigsetjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures
index 414feeccf7..23d83928ae 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
#ifndef _def_sigfeatures_ksh93
#define _def_sigfeatures_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _lib_sigrelse 1 /* sigrelse() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time
index e70e599608..94e0aff156 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/time by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
#ifndef _def_time_ksh93
#define _def_time_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_utime 1 /* #include <utime.h> ok */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys
index 22b580c8ac..a5da4d7141 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys
+++ b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys
@@ -1,11 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/src/cmd/ksh93/features/ttys by iffe version 2009-10-06 : : */
+/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/ttys by iffe version 2009-12-04 : : */
#ifndef _def_ttys_ksh93
#define _def_ttys_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
-#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
+#define _LIB_dll 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libdll.a is a library */
+#define _LIB_ast 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libast.a is a library */
#define _LIB_m 1 /* -lm is a library */
-#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20091014/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
+#define _LIB_cmd 1 /* /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/arch/sol11.sun4/lib/libcmd.a is a library */
#define _LIB_md 1 /* -lmd is a library */
#define _LIB_nsl 1 /* -lnsl is a library */
#define _hdr_termios 1 /* #include <termios.h> ok */