diff options
author | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-04-03 09:48:44 -0700 |
---|---|---|
committer | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-04-03 09:48:44 -0700 |
commit | 3e14f97f673e8a630f076077de35afdd43dc1587 (patch) | |
tree | 9828b6b676f58d7b27dd28e00202d3f3461a5cd8 /usr/src/lib/libshell/misc/buildksh93.sh | |
parent | 4f60987df4dcaa54a88b596f861fbf4f3382c65e (diff) | |
download | illumos-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/misc/buildksh93.sh')
-rw-r--r-- | usr/src/lib/libshell/misc/buildksh93.sh | 148 |
1 files changed, 90 insertions, 58 deletions
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 |